Sub expressions are evaluated before the expressions they are a part of. Order of evaluation within a subexpression is in precedence order with ties broken left to right.
In the expression you gave, both ( $y + 1 ) are subexpressions and would be evaluated before the overall expression, left to right. The fact that they are the same subexpression gives rise to the possible optimisation.
In reply to Re^5: Why is the execution order of subexpressions undefined? (sane?)
by BrowserUk
in thread Why is the execution order of subexpressions undefined?
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |