2012/4/17 Gustavo Lopes <glo...@nebm.ist.utl.pt>:
>
> I think that would be an error. As was mentioned a few months ago when 0b
> was introduced, no other number format has this behavior. You can't do "123"
> == "0b10" or "123" == "0876". Extending this hexadecimal oddity instead of
> eliminating it is inconsistent with the treatment given to those other
> formats.
>
> --
> Gustavo Lopes
>

Hi, Gustavo

That's something I didn't know of ... if we're doing that, it should,
of course, be also be done for the dual system.
The only thing I wonder about is the code examples you're giving ...

I would expect this to work if we start to change something here:

var_dump((int) '0x7b'); // int(123)
var_dump((int) '0b1111011'); // int(123)
var_dump((int) '0123'); // int(123)

The last example was not mentioned here before but as you set in an
example, I did it here as well ...

Bye
Simon

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

Reply via email to