Home » PHP » PHP Operators » Question
  1. What will be the output of the following PHP code ?
    <?php
    $t = 5;
    if ($t-- == ++$t)
    {
    echo $t;
    }
    ?>
    1. Error
    2. 0
    3. Nothing
    4. 5
    5. None of these
Correct Option: D

First $t = 5 is compared to and then decremented, then incremented and compared to $t = 5.



Your comments will be displayed only after manual approval.