On Tue, 17 Apr 2012 13:20:33 +0200, Nikita Popov <nikita....@googlemail.com> wrote:

The internal is_numeric_string [1] function is used to check whether a
string contains a number (and to extract that number).

Currently is_numeric_string also accepts hexadecimal strings [2]
(apart from the normal decimal integers and doubles).

[...]
In my eyes accepting hex strings in is_numeric_string leads to a quite
big WTF effect and causes problems and as such should be dropped.

I don't think this has much BC impact, so it should be possible to change it.


I think definitely has a larger BC impact than you're portraying, I can see some people making comparisons against '0xA' instead of 0xA.

Besides, this is part of the Zend API. It's already used in many extensions (though possibly some of these should be using a stricter function) and changing its behavior is a stable branch is not wise:

http://lxr.php.net/opengrok/search?q=&project=PHP_TRUNK&defs=&refs=is_numeric_string

But in case, if there are no graver BC impacts, +1 for master.

--
Gustavo Lopes

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to