Home » PHP » PHP Operators » Question
  1. What will be the output of the following PHP code ?
    <?php
    $n = 9;
    while (++$n)
    {
    while (--$n > 0)
    print $n;
    }
    ?>
    1. Error
    2. 9
    3. 987654321
    4. Nothing
    5. None of these
Correct Option: C

The loop never ends as n is always incremented and then decremented.



Your comments will be displayed only after manual approval.