Q. What will be the output of the following PHP code ?
Code:
<?php
$m = 8;
while (--$m > 0 || ++$m)
{
print $m;
}
?>
β
Correct Answer: (B)
76546211111........infinite time
Explanation: As it is || operator the second expression is not evaluated till m becomes 1 then it goes into a loop.