0
In/Decrement operators
<?php $x = 11; echo --$x; // The output is 10 echo $x--; // The output is 10 echo $x; // Why this is veriable output is 9 ?> I did not understand why $x out put is 9 plese clearly exappane it why decrese and with show your exampele Waiting for replay.. bye...
2 Respostas
+ 1
$x-- it first prints its value then decrement occurs and stores the decremented value in memory
--$x it decrements first and stores the decremented value in memory and then prints the value of x
0
because $x-- first print it's value than minus 1