Home / CSE / PHP - CS :: Discussion

Discussion :: PHP - CS

  1. What will be the output of the following PHP code ?

    <?php

    $a = 5;$b = -7;$c =0;

    $d = ++$a && ++$b || ++$c;

    print $d;print $a;

    ?>

  2. A.

     16

    B.

     06

    C.

     15

    D.

     05

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    1&&0||1 is evaluated to 1 and the a is also pre incremented to 6.


Be The First To Comment