Re: [RFC] Introduce Abstract Syntax Tree
| From: | Christoph Becker | Date: | Thu, 14 Aug 2014 11:30:27 +0000 |
| Subject: | Re: [RFC] Introduce Abstract Syntax Tree | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-76514@lists.php.net to get a copy of this message | ||
Michael Wallner wrote:
> On 14 08 2014, at 11:33, Alain Williams <addw@phcomp.co.uk> wrote:
>
>> It is OK to define some things as undefined and have them break between releases -
>> even minor releases. I always teach it as undefined - as it is in most
>> programming languages.
>>
>> Likewise, if the next 2 characters on input are 'a' then 'b' what gets
>> assigned
>> could either be 'ab' or 'ba':
>>
>> $TwoChars = fgetc($in) . fgetc($in);
>>
>> 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.
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>
--
Christoph M. Becker