Just one little note: If I'm not mistaken this would introduce a subtle BC
break when doing the comparison "0b1" == 1 which is false > > now but
would return true afterwards, right? Likewise is_numeric("0b1") would
suddenly return true.
Is it worth the (possible) WTF for something hardly ever used?
- Chris
With regards to parsing numeric strings, only decimal is supported, and in
some cases (unfortunately) hexadecimal, like your comparing example. But
octal is not supported in strings, and neither should binary.
0xF == 15 // true
'0xF' == 15 // true
010 == 8 // true
'010' == 8 // false
It should be a important consideration that numeric string parsing isn't
affected by this patch, and things will be fine.
In fact it should be a separate discussion whether hex should work in
strings at all. It's very counterproductive when parsing user input.
Stan Vass
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php