Re: [PHP-DEV] Re: Supporting Binary Notation for Integers

2010-11-12 Thread Jonah H. Harris
On Fri, Nov 12, 2010 at 5:49 AM, Christian Schneider wrote: > > It should be a important consideration that numeric string parsing isn't > affected by this patch, and things will be fine. > > If neither '0b1' == 1 nor is_numeric('0b1') is true after this patch then I > see no problem. > This is c

Re: [PHP-DEV] Re: Supporting Binary Notation for Integers

2010-11-12 Thread Christian Schneider
Am 12.11.2010 um 09:22 schrieb Stan Vass: > 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 //

Re: [PHP-DEV] Re: Supporting Binary Notation for Integers

2010-11-12 Thread Stan Vass
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

Re: [PHP-DEV] Re: Supporting Binary Notation for Integers

2010-11-11 Thread Thomas Hruska
On 11/11/2010 8:57 PM, Christian Schneider wrote: On Thu, Nov 11, 2010 at 3:57 PM, Jonah H. Harris wrote: RFC added. I'm not sure what the protocol for RFCs is, but I put it under the In Discussion heading. Sorry if I was wrong. http://wiki.php.net/rfc/binnotation4ints Just one little note:

[PHP-DEV] Re: Supporting Binary Notation for Integers

2010-11-11 Thread Christian Schneider
On Thu, Nov 11, 2010 at 3:57 PM, Jonah H. Harris wrote: > RFC added. I'm not sure what the protocol for RFCs is, but I put it under > the In Discussion heading. Sorry if I was wrong. > http://wiki.php.net/rfc/binnotation4ints Just one little note: If I'm not mistaken this would introduce a subt