?
What will be the output of the following PHP code ?
What will be the output of the following PHP code ?
<?php
$i = 0;
$x = $i++; $y = ++$i;
print $x; print $y;
?>
<?php
$i = 0;
$x = $i++; $y = ++$i;
print $x; print $y;
?>
Answer & Solution
Correct Answer:
Option
A
First case i is incremented after setting x to i.
Join the Discussion
Login to post a comment or share your explanation.
Login