Hey Dmitry, > On 14 Jan 2015, at 20:40, Dmitry Stogov <dmi...@zend.com> wrote: > > In my opinion, version 0.1 was consistent enough. > > handling two different approaches just makes mess... > > We have internal function strlen(string $s), and it may be called with > integer argument e.g. strlen(123) -> 3 > I think user functions should follow the same rules.
This RFC does that. In the “weak” mode that would continue work, and it would also for userland functions with scalar type hints. In the “strict” mode that would break, and it would also break for a similar userland function with a scalar type hint. > > If some rules are "bad", lets change that rules for both internal and user > functions. > But it's better to do it in a separate RFC (after scalar type hinting 0.1 > accepted), or we will stick forever. I’m not sure the weak typing approach to function parameters is bad per se, but a lot of developers would certainly prefer the strict typing approach. That’s why the RFC allows choice: for all the people that weak typing works for, good, you can keep using that. The people who want strict typing get strict typing without forcing the people who want weak typing to use it. Thanks. -- Andrea Faulds http://ajf.me/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php