Zeev Suraski wrote (on 14/07/2014):
I'd say absolutely yes, if they're PHP developers that's exactly what they'd
expect.  After all, if you use 'hello' today in any integer context in PHP,
explicit or implicit, that's exactly how it will behavior across the
language.

And yet if you use it as a parameter to a type hinted function, it will produce an error.

You can be consistent with casts, or consistent with existing type hints, but not both.

If the current type hints were only for objects, I would be OK with that, but I really don't get why an array cast is so different from an int cast.

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

Reply via email to