"/>
Home / CSE / PHP - CS :: Discussion

Discussion :: PHP - CS

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

    <?php

    $auth = 1;

    $status = 1;

    if ($result = (($auth == 1) && ($status != 0)))

    {

    print "result is $result";

    }

    ?>

  2. A.

     result is true

    B.

     result is 1

    C.

     error

    D.

     no output

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    Result is x&&y which returns 1 if both x and y are true.


Be The First To Comment