On Mon, Feb 9, 2015 at 1:22 PM, Lars Strojny <l...@strojny.net> wrote: > Hi Matteo, > > sorry for the late response. > >> On 07 Feb 2015, at 12:46, Matteo Beccati <p...@beccati.com> wrote: >> >> Maybe it's just me, but I didn't quite understand the point you are making >> here. Are you saying that declares are more or less like ini settings? > > Yes, exactly that. The new declare()-statement will fundamentally change how > the engine behaves and one will have two learn more or less two flavors of > PHP. Even worse I am forced to use the PHP flavor the person picked who > changed the declare() statement last. > > cu, > Lars
This is strange for me to understand but I do see it come up a lot. "if you have foo(string $name), you expect strict type... if you want weak type, foo($name). All code will work as is today, no BC breaks." No. If I have foo(string $name), I expect a string. I don't care if its strong or weak, I just want a string. The weak or strong bit is up to the user, which is why they're the ones holding the switch. While I understand the wish to preach best practices to the PHP community in general - because heck knows some people need it - this is more of an entry for phptherightway.com than the job of every single library author to try and force the community ot use strict typing one library at a time. The function author doesn't need to care if its strong or weak. They just need to care that they have the right type. And they will, every time. Using foo($name) will give me the wrong types, so no thanks on that :) -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php