On 14 Jul 2014, at 15:54, Derick Rethans <der...@php.net> wrote: > A compromise by adding more inconsistencies. > > I can buy the cast of scalars vs hint--of-complex types, but definitely > not the introduction of a new group of casting rules. Keep it simple.
It doesn’t change the casting rules; write an error handler that ignores E_RECOVERABLE_ERROR and you get exactly the same result as a manual cast inside the function. Rather, it simply adds validation. The casting works like casting does everywhere else, but there’s strict lossless validation on the type hint, similar to the non-scalar type hints except more lenient as it allows equivalent values of other types. -- Andrea Faulds http://ajf.me/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php