On 13/09/2019 09:10, Christian Schneider wrote:
Is it really worth it?
It's absolutely worth it. Stopping execution flow at erroneous or
ambiguous statements is an essential part of secure, reliable programming.
A notice or warning offers no protection at all. Unless you've taken
some very specific steps, your program will continue operating as if
they never happened, even if that notice or warning was clearly a high
probability of being a bug.
And if you really think so, could we make it opt-in?
People should not have to opt in to common sense defaults. If I sell you
a car, you shouldn't have to opt in to having the bolts on your tyres
fastened on tight enough that the wheels don't fall off the moment you
hit motorway speed.
Or at least globally opt-out-able?
Let's not. Never again should an option like enable_short_tags exist. If
you want a per-file opt out, the notion of
declare(sloppy=1);
Has already been jokingly proposed, and I would personally have no
problem with it if people want to opt-in to less reliable enforcement...
but once again, I stress that the defaults should always be best-practices.
--
Mark Randall
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php