?
What will be the output of the following PHP code ?
What will be the output of the following PHP code ?
<?php
$i = 5;
while (--$i > 0 && ++$i)
{
print $i;
}
?>
<?php
$i = 5;
while (--$i > 0 && ++$i)
{
print $i;
}
?>
Answer & Solution
Correct Answer:
Option
B
As it is && operator it is being incremented and decremented continuously.
Join the Discussion
Login to post a comment or share your explanation.
Login