In this
$x = $a++ + ++$a;
you have SUBEXPRESSION OP SUBEXPRESSION
Whereas in this
$x = $a + $a;
You have TERM op TERM.
With
$x = $a++ + ++$a;
The subexpressions must be resolved to terms, before the expression containing op can be evaluated.
With EO defined, there is no abiguity about what order those sub expression must be resolved. There is no opportunity here for parallelization when resolving the subexpressions because there is no shared OP involved. Ie. Each subexpression hash it's own op (pre and post increment).
Once both subexpressions have been resolved the parameters to + become available, the are just unnamed, intermediate, numeric values. Again, no parallelisation is possible (because you already have the operands to '+').
Your mistake is that you are not seeing the subexpressions that defined EO would force to be resolved first and in a defined sequence.
In reply to Re^26: Why is the execution order of subexpressions undefined?
by BrowserUk
in thread Why is the execution order of subexpressions undefined?
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |