Home / CSE / PHP - CS :: Discussion

Discussion :: PHP - CS

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

    <?php

    $a = 1; $b = 3;

    $d = $a++ + ++$b;

    echo $d;

    ?>

  2. A.

     5

    B.

     4

    C.

     3

    D.

     error

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    Post increment of a is done after expression evaluation.


Be The First To Comment