Sometimes when golfing in PHP, one uses tricks as reading/pushing to an inexistent variable, or using deprecated functions such as split()
, but those things outputs Warnings and Notices, which by themselves are not really errors and don't change how the code works.
Is there any policy regarding the output of these type of errors?
Should I add provisions to remove or hide the warnings in my code even if the questions doesn't ask it as a requirement or should I consider that the PHP configuration has error_reporting = 0
?
I have seen C answers that output compiler warnings (the closest equivalent I can think now)
php ./program.php 2>/dev/null
"? \$\endgroup\$display_errors
is set to'stderr'
\$\endgroup\$