Home » PHP » PHP Operators » Question
  1. What will be the output of the following PHP code ?
    <?php
    $p = 8; $r = 7; $q = 15;
    $s = $p + $r == $q;
    print $s;
    ?>
    1. 15
    2. 1
    3. 8
    4. 7
    5. None of these
Correct Option: A

First p and r are added and then tested if s = 15, which is true thus return 1.



Your comments will be displayed only after manual approval.