Re: [RFC] Introduce Abstract Syntax Tree
| From: | Michael Wallner | Date: | Fri, 15 Aug 2014 07:28:15 +0000 |
| Subject: | Re: [RFC] Introduce Abstract Syntax Tree | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-76535@lists.php.net to get a copy of this message | ||
On 14/08/14 13:30, Christoph Becker wrote:
> Michael Wallner wrote:
>
>> On 14 08 2014, at 11:33, Alain Williams <addw@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