Looks like we have a precedence bug in the parser rules there.
Fortunately it's quite easy to fix, for example writing the rules as:
| '+' expr %prec `T_INC`
| '-' expr %prec `T_INC`
seems to work. Any reason not to?
Stanislav Malyshev, Zend Products Engineer
stas@zend.com http://www.zend.com/
Stanislav Malyshev wrote:
Looks like we have a precedence bug in the parser rules there.
Fortunately it's quite easy to fix, for example writing the rules as:| '+' expr %prec `T_INC` | '-' expr %prec `T_INC`
seems to work. Any reason not to?
I think this should go in. It is an obvious mistake in the parser as
far as I am concerned.
-Rasmus
Stanislav Malyshev wrote:
Looks like we have a precedence bug in the parser rules there.
Fortunately it's quite easy to fix, for example writing the rules as:| '+' expr %prec `T_INC` | '-' expr %prec `T_INC`
seems to work. Any reason not to?
I think this should go in. It is an obvious mistake in the parser as
far as I am concerned.
However, it's probably possible that this will break some stuff for
people, so I don't think we should do it in PHP 4.4.
regards,
Derick
Stanislav Malyshev wrote:
Looks like we have a precedence bug in the parser rules there.
Fortunately it's quite easy to fix, for example writing the rules
as:| '+' expr %prec `T_INC` | '-' expr %prec `T_INC`
seems to work. Any reason not to?
I think this should go in. It is an obvious mistake in the parser
as
far as I am concerned.However, it's probably possible that this will break some stuff for
people, so I don't think we should do it in PHP 4.4.
Honestly, anybody who has any code that this breaks and hasn't caught
it yet is probably just a time bomb waiting to mess them up, even in
4.4, as far as I can tell...
I suspect most developers just wrapped some parens around the bug and
moved on with life...
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?