Home » PHP » PHP For Loops » Question
  1. What will be the output of the following PHP code ?
    <?php
    $num;
    for ($num = -4; $num < -6; ++$num)
    {
    print ++$num;
    }
    ?>
    1. Nothing
    2. -4
    3. -6
    4. Error
    5. None of these
Correct Option: A

The loop is not even entered as num is initially 0.



Your comments will be displayed only after manual approval.