Home » PHP » PHP Variables » Question
  1. What will be the output of the following PHP code ?
    <?php
    $n1 = 7.5;
    $n2 = 4;
    $n3 = 4;
    echo $n1 / $n2 / $n3;
    ?>
    1. 0.46875
    2. 7.5
    3. 4
    4. 0
    5. None of these
Correct Option: A

First $n1 / $n2 is evaluated then this is divided by $n3 therefore we get .46875.



Your comments will be displayed only after manual approval.