On Mon, 07 May 2012 10:31:00 +0200, Kris Craig <kris.cr...@gmail.com>
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
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php