Discussion :: PHP - CS
-
What will be the output of the following PHP code ?
<?php
$i = 5;
while (--$i > 0 || ++$i)
{
print $i;
}
?>
Answer : Option A
Explanation :
As it is || operator the second expression is not evaluated till i becomes 1 then it goes into a loop.
Be The First To Comment