Discussion :: PHP - CS
-
What will be the output of the following PHP code ?
<?php
$i = 0;
while(++$i || --$i)
{
print $i;
}
?>
Answer : Option A
Explanation :
As it is || operator the second expression is not evaluated and i is always incremented, in the first case to 1.
Be The First To Comment