On 12 May 2015 22:32:55 BST, Rowan Collins <rowan.coll...@gmail.com> wrote:
>It is already possible to pass around, and type hint for, any class of
>object, so you could for instance have a DatabaseID class. PHP's lack
>of operator overloading makes that less appealing, perhaps, but it
>would work.

Incidentally, it's still not the type hint that's performing validation here - 
that would go in the constructor of the object, I guess. Rather, the type hint 
holds the promise that the validation has already happened somewhere else.



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

Reply via email to