On Feb 21, 2015 2:02 PM, "Zeev Suraski" <z...@zend.com> wrote:
> > I agree we should have users avoid explicit casts. That's why the > > dual-mode > > proposal exists. If users don't want to control their types, they should > > use the > > default mode. And everything works fine. > > This ignores the reasonable guesstimate - raised by several people here - > that many will flip Strict mode on because they'd think it makes them > inherently safer, faster, or just a good thing to do. Everything I've > learned about PHP in the last couple of decades tells me there are going to > be plenty of those. Those are the same people who would quickly then add > explicit casts to make the code work again; Those are also people who would > benefit a lot more from a single mode system that would point out real > problems in their code, with likely very few false positives or false > negatives. This is not even a remotely comparable to a guess. The users I talk to likes it because they see it as a way to improve their code, not the performance or security but see it as as cleaner, more readable, less error prone, more predictable. Like the drupal case, I would not suggest them to move to strict everywhere, but modules would be free to do so, or part of the core. And that without any impact on the 3rd party users. I repeat, without any impact.