On 23 Jul 2014, at 19:37, Andrea Faulds <a...@ajf.me> wrote:

> 
> On 23 Jul 2014, at 19:21, Robert Williams <rewilli...@thesba.com> wrote:
> 
>> Also, do int, float, and numeric accept numbers in octal, hex, scientific 
>> notation, etc.? I don’t believe there are any examples in the RFC that 
>> intentionally or accidentally show what happens with, say, 0x2f as a value.
> 
> Ooh, you’ve caught me out there. The patch as it stands would permit such 
> non-decimal numbers, which isn’t what it should do as 
> convert_to_long_base_safe should actually permit only the specified base.
> 
> So, yes it does permit non-decimal numbers, but it’s a bug I need to fix.

Said bug has been fixed in the proposed patch now. “0xa” is no longer valid for 
int, float or numeric. It never should’ve been valid, but the implementation of 
convert_to_(long_base|double|numeric)_safe was incorrect.

--
Andrea Faulds
http://ajf.me/





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

Reply via email to