Re: Deprecation of the Error Control Operator (@ symbol)
| From: | Rowan Collins | Date: | Tue, 05 Jan 2016 19:40:12 +0000 |
| Subject: | Re: Deprecation of the Error Control Operator (@ symbol) | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-90138@lists.php.net to get a copy of this message | ||
Ferenc Kovacs wrote on 05/01/2016 18:09:
sure and most projects check the error_reporting() level against the $errno
like in the manual:
if (!(error_reporting() & $errno)) {
// This error code is not included in error_reporting
return;
}
@ changes the error_reporting() level for that particular call, so those
custom error handler won't throw exceptions for the suppressed errors but
when you remove/nop @ their code would throwing stuff left and right.
I'm lost - how does this validate the claim that building scream mode into core would lead to problems? We already have an ini setting which can change the error_reporting level, so any error handler relying on that is *already* subject to different behaviour in different environments. Any codebase which wants to ignore the settings of the environment would surely already omit that boilerplate, and thus be unaffected by the presence or functionality of the @ operator.
Regards,
--
Rowan Collins
[IMSoP]