the result of the following statement should give 9 : (using java or js or c++)
i = 1;
i += ++i + i++ + ++i;
//i = 9 now
but in php
the same statements will give 12 ?!
$i = 1;
$i += ++$i + $i++ + ++$i;
echo $i;
is this a bug or can anyone explain why ?