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

Home » PHP » PHP If Else/Else If Statement » Question
  1. What will be the output of the following PHP code ?
    <?php
    $p = 22;
    if ($p-- - --$p - $p)
    print "Interview";
    else
    print "Mania";
    ?>
    1. 0
    2. 1
    3. Mania
    4. Interview
    5. None of these
Correct Option: D

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.