Home / CSE / PHP - CS :: Discussion

Discussion :: PHP - CS

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

    <?php

    $a = 10;

    echo ++$a;

    echo $a++;

    echo $a;

    echo ++$a;

    ?>

  2. A.

     11111213

    B.

     11121213

    C.

     11111212

    D.

     11111112

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    ++$a increments a and then prints it,$a++ prints and then increments.


Be The First To Comment