2016-12-02 12:16 GMT-02:00 Alex Bowers <bowersb...@gmail.com>:
> var_dump was just an example to "show what type the variable is", and
> completely untested. Consider replacing that line with anything that would
> make it clear to you that it is now no longer an array, but a Collection for
> example.

Sure, but how the engine will knows when it should __cast()?

For instance, when method(Type $variable) will call Type::__cast() for
$variable, or just work with the Type instance?

In this case, is not better I create an interface (like IsCollection)
and call $variable->getCollection()?

Thanks!


-- 
David Rodrigues

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

Reply via email to