"> What will be the output of the following PHP code ?<?php$num

Home » PHP » PHP If Else/Else If Statement » Question
  1. What will be the output of the following PHP code ?
    <?php
    $num = 1;
    if ($num--)
    print "False";
    if ($num++)
    print "True";
    ?>
    1. Nothing
    2. False
    3. True
    4. Error
    5. None of these
Correct Option: C

Due to post increment and post decrement only the first condition is satisfied.



Your comments will be displayed only after manual approval.