On 24 Jul 2014, at 13:20, Simon Schick <[email protected]> wrote:

>> Conversion is allowed only if data-loss does not happen. There are a few 
>> exceptions (objects using __toString, strings containing leading numerics, 
>> etc). Here's a table of examples.
> 
> But if you look at the table, strings containing leading numbers are
> not allowed.

Good catch, fixed.

> And just as a thought: What about objects where the __toString method
> returns a string like "42"? Would that also be accepted as an
> argument, that just accepts integers?

No it wouldn’t, as that’s not what cast_object does, existing conversion 
functions do, or what the patch does at present.
--
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