<?php
$i = 2;
$i = $i++;
echo $i;
?>
Output of above code is 2.
<?php
$i = 2;
$p = $i++;
echo $i;
?>
Output of above code is 3.
Why this difference? I mean how these codes are processed to give an output?
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.