Home / CSE / PHP - CS :: Discussion

Discussion :: PHP - CS

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

    <?php

    $i = 5;

    while (--$i > 0 && ++$i)

    {

    print $i;

    }<

    ?>

  2. A.

     5

    B.

     555555555…infinitely

    C.

     54321

    D.

     error

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    As it is && operator it is being incremented and decremented continuously.


Be The First To Comment