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 @ version

As 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]

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to