On 24/09/14 02:08, Stas Malyshev wrote:
> Hi!
> 
>> I do believe that the UString class would benefit from such a change.
>>
>> Why would it be confusing to implement this?
> 
> For some objects, it may lead to rather strange results - i.e.,
> Exception has __toString() but probably not very useful one for use as
> an array key. So may some other __toString methods. But in general, if
> we streamline the conversion rules and set expectations, I don't see why
> PHP engine can not check for object's convertor to string and even to
> int if string one is not there. Yes, that would hide some errors but
> also will enable some capabilities (like much smoother work with objects
> that may simulate numbers, akin to GMP).
> 

Well, then let's remove this restriction from resources, too.

-- 
Regards,
Mike

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

Reply via email to