Ilia Alshanetsky wrote: > > On 24-Aug-09, at 6:54 PM, Greg Beaver wrote: >> >> 2) as long as the patch does not break any backwards compatibility >> (error logging still works as it always did independent of error_mask, >> user error handlers still get the same stuff), why would we care? There >> is a time and place for being academic about fixing things and it is >> called development, not production. > > You must not have any bugs in production environment, I am very envious. > :-)
Ilia, I don't see how this kind of emotional hyperbole contributes positively to the discussion. If I understand you right, you're arguing that people should never use code in production that emits errors. That is certainly the goal. It's also not always possible to do this when relying upon third-party code which may have been written for a pre-E_STRICT or a pre-E_DEPRECATED php version. What I don't understand is why you think this: <?php error_reporting(E_WARNING|E_ERROR|E_NOTICE|E_USER_WARNING|E_USER_ERROR|E_USER_NOTICE); class A { // emits an E_STRICT normally, and we waste cycles emitting an E_STRICT that is never emitted function A(){} } ?> is better than: <?php ini_set('error_mask', E_WARNING|E_ERROR|E_NOTICE|E_USER_WARNING|E_USER_ERROR|E_USER_NOTICE); class A { // just works (TM) as fast as it did in PHP 4 function A(){} } ?> IF (and a big if) no user error handler is in place, which should pass all possible errors into the error handler. If your fear is that third party people might do something horrendous like: <?php ini_set('error_mask', 0); stupidfatalerror(); ?> That's also easily solved by making it INI_SYSTEM. Greg -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php