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

Discussion :: PHP - CS

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

    <?php

    $num = "1";

    $num1 = "2";

    print $num+$num1;

    ?>

  2. A.

     3

    B.

     1+2

    C.

     Error

    D.

     12

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    The numbers inside the double quotes are considered as integers and not string, therefore the value 3 is printed and not 1+2.


Be The First To Comment