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

Home » PHP » PHP If Else/Else If Statement » Question
  1. What will be the output of the following PHP code ?
    <?php
    $n = 12;
    if ($n-- - --$n - $n)
    print "First";
    else
    print "Second";
    ?>
    1. Error
    2. First
    3. Nothing
    4. Second
    5. None of these
Correct Option: B

Computing the expression in the if clause,it sums upto to 2 which is a positive value.



Your comments will be displayed only after manual approval.