Home / CSE / PHP - CS :: Discussion

Discussion :: PHP - CS

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

    <?php

    $a = 1; $b = 1; $d = 1;

    print ++$a + ++$a+$a++; print $a++ + ++$b; print ++$d + $d++ + $a++;

    ?>

  2. A.

     869

    B.

     742

    C.

     368

    D.

     error

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    Follow the order of post and pre increments.


Be The First To Comment