-
What will be the output of the following PHP code ?
<?php
$num = 8;
while (--$num > 0 || ++$num)
{
print $num;
}
?>
-
- 76543211111111......infinite time
- Error
- Nothing
- 7654321
- None of these
Correct Option: A
As it is || operator the second expression is not evaluated till num becomes 1 then it goes into a loop.