Re: 1/-2*5 (bug 41401)

From: Date: Mon, 21 May 2007 20:11:05 +0000
Subject: Re: 1/-2*5 (bug 41401)
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-29639@lists.php.net to get a copy of this message
On Fri, May 18, 2007 12:03 pm, Derick Rethans wrote: > On Fri, 18 May 2007, Rasmus Lerdorf wrote: > >> 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?

« previous php.internals (#29639) next »