On 14/08/14 13:30, Christoph Becker wrote: > Michael Wallner wrote: > >> On 14 08 2014, at 11:33, Alain Williams <a...@phcomp.co.uk> wrote: >>> Some code is just broken. >> >> Wat? No. This is totally different to two in/decrements on one line. This >> has to be executed in order.
Ignore that. > > The current specification draft says[1]: > > | Unless stated explicitly in this specification, the order in which > | the operands in an expression are evaluated relative to each other is > | unspecified. > | [...] > | Finally, in the full expression f() + g() * h(), the order in which > | the three functions are called, is unspecified). > > [1] > <https://github.com/php/php-langspec/blob/master/spec/10-expressions.md#expressions> > You're right, it's documented, too; in the operator section not in the expression section, though: ---8<--- PHP does not (in the general case) specify in which order an expression is evaluated and code that assumes a specific order of evaluation should be avoided, because the behavior can change between versions of PHP or depending on the surrounding code. --->8--- http://php.net/manual/en/language.operators.precedence.php -- Regards, Mike -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php