Home » PHP » PHP Variables » Question
  1. What will be the output of the following PHP code ?
    <?php
    $a = 23;
    $b = 15;
    $c = 25;
    echo $a + $b - $c / ($c - $b);
    ?>
    1. 35.5
    2. 23
    3. 15
    4. 25
    5. None of these
Correct Option: A

First ($c – $b) is evaluated then -$c/($c – $b) is evaluated this which is added to $a + $b therefore we get 35.5.



Your comments will be displayed only after manual approval.