Re: Deprecation of the Error Control Operator (@ symbol)
| From: | Rowan Collins | Date: | Fri, 08 Jan 2016 19:10:23 +0000 |
| Subject: | Re: Deprecation of the Error Control Operator (@ symbol) | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-90393@lists.php.net to get a copy of this message | ||
Dan Ackroyd wrote on 08/01/2016 18:36:
Apologies, it should be: $counts[$item] = ($counts[$item] ?? 0) + 1; Which both works, and to me, is more readable than the @ versionAs with the file-manipulation functions, I think you're focussing too much on the specific example and not on the general principle. If we go through every single Notice and Warning discussing its implications, when you might want to suppress it, when it should be considered fatal, etc, we'll be here forever. If there is even one Notice or Warning which is - subjectively - (a) useful, and (b) non-fatal if ignored, then "turn everything into an exception" is not a complete solution. Regards, -- Rowan Collins [IMSoP]