> (Now, it would be nice to have another RFC about custom object casting to
> int, float and bool...)

You mean like https://wiki.php.net/rfc/object_cast_to_types which is
still in draft?

Note that __toBool would be problematic, since it would be called if
the object was used in an if statement, which could yield some very
strange results if it returned false (it would break the existing
semantics about how we can use if statements to determine if the type
is populated)...

Anthony

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

Reply via email to