Home / CSE / PHP - CS :: Discussion

Discussion :: PHP - CS

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

    <?php

    $i = 0;

    $x = $i++; $y = ++$i;

    print $x; print $y;

    ?>

  2. A.

     02

    B.

     12

    C.

     01

    D.

     21

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    First case i is incremented after setting x to i.


Be The First To Comment