The php manual claims that:
$a = 1;
echo ++$a + $a++;
is ambiguous under its grammar, but it seems extremely clear to me. ++$a and $a++ evaluate first, from left to right, so ++$a increments and then returns 2, and $a++ returns 2 and then increments. The sum of 2 + 2 is 4, so it would echo 4. However, The PHP Manual says very clearly that it may print 4 or 5.
Does the php spec not specify that operations will be performed from left to right?
Even if it doesn't enforce that operations will be performed from left to right, in this case, wouldn't it return 4 regardless?
Edit: I reread the page, and it stated that it is determined by each specific operator. + has lowest precedence, and evaluates from left to right, so it seems like my earlier assumption was correct. I still do not understand.