Re: [off] PHP: a fractal of bad design

From: Date: Mon, 07 May 2012 08:46:29 +0000
Subject: Re: [off] PHP: a fractal of bad design
References: 1 2 3 4 5 6 7 8  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On Mon, 07 May 2012 10:31:00 +0200, Kris Craig <[email protected]> wrote:

That being said, I agree that this *definitely* should be fixed if the examples cited are indeed accurate (I've been working with PHP for over 10 years and I was never aware of this bizarre behavior, either). I don't know the history of this, but I at least would consider it to be a bug. A rather large one, in fact; though I think some of the fears expressed are a bit hyperbolic. And if you're fixing a serious bug or security vulnerability, as a general rule of thumb, this automatically supercedes any concerns regarding BC breakage IMHO.
This has already been discussed in its own thread, see http://comments.gmane.org/gmane.comp.php.devel/72790 ; see also https://bugs.php.net/bug.php?id=54547 Doing away entirely with this behavior (e.g. making " 2" == "2" compare false) would be a rather large BC break, that discussion is restricted to whether integers in strings should be treated differently from integer literals for comparison purposes when their range is exceeded. I wrote a patch for that, and, while not really caring one way or the other, I'm not convinced it's necessary and I some have consistency concerns (though float overflows already get a similar treatment). -- Gustavo Lopes

Thread (42 messages)

« previous php.internals (#60502) next »