Re: Operator precedence is undefined?
| From: | Sherif Ramadan | Date: | Sat, 20 Jul 2013 02:21:34 +0000 |
| Subject: | Re: Operator precedence is undefined? | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-68236@lists.php.net to get a copy of this message | ||
On Fri, Jul 19, 2013 at 10:16 PM, Yasuo Ohgaki <yohgaki@ohgaki.net> wrote:
> Hi Sherif,
>
> Thank you for your info!
>
> 2013/7/20 Sherif Ramadan <theanomaly.is@gmail.com>
>
>> I don't see where there is a bug in the documentation, no.
>
>
> It is in doc's example code.
>
>
Then I would say that example is wrong, but people may find reason to
disagree. I'm basing my contention purely off what I see in php-src and the
documented behavior for those operators. To me I see no reason why this
behavior would be considered undefined. The ternary operator definitely has
some undefined behavior in terms of precedence since its interpreted as a
statement and not like other operators in expressions. To me post/pre
inc/dec are pretty well-defined.
I would say there is no harm in removing that comment from the
documentation.