On 13/07/2014 17:09, Jocelyn Fournier wrote:
If "type hint" is doing exactly the same than explicit cast, it should not fail on wants_array('abc'), but give a warning about the implicit cast conversion.

Agreed, but that's a very big "if", and is not what this RFC is proposing at all. Nor could it cleanly use the current syntax, since function foo(array $foo) is already valid, and does not perform such a cast.

If you haven't already, please do read Nikita's article which has been linked several times in this thread, which discusses the different options. This proposal is closer to "strict weak type hinting" than "casting weak type hinting"; it differs in *performing* a non-lossy cast, rather than just asserting the *possibility* of one.

Regards,

--
Rowan Collins
[IMSoP]


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

Reply via email to