"> What will be the output of the following PHP code ?<?phpif

Home » PHP » PHP If Else/Else If Statement » Question
  1. What will be the output of the following PHP code ?
    <?php
    if (!print "First")
    if (print "Second")
    print "Third";
    ?>
    1. Error
    2. Nothing
    3. First
    4. Second
    5. Third
Correct Option: C

Print returns true and thus the first if statement also is not executed.



Your comments will be displayed only after manual approval.