?
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; print "hello";
}
?>
<?php
$i = 5;
while (--$i > 0)
{
$i++; print $i; print "hello";
}
?>
Answer & Solution
Correct Answer:
Option
A
i is decremented in the first while execution and then continuously incremented back.
Join the Discussion
Login to post a comment or share your explanation.
Login