Please, take a look at the following expression:
$x = 20;
echo $x+++$x++; // 41
Altough I can't find any mention in the PHP docs, I guess PHP evaluates from right, and
++ acts like the same operator in C/C++ (see inc/dec PHP operator docs)
So, the expression:
in fact does (evaluated from the right):
It is worth mentioning, though, that in this case the same results is obtained even if the expression is evaluated from the left.