PHP elephant

Custom PHP error handler not respecting error suppression

When using a custom error handler in PHP, it is going to track all errors, warnings and notices regardless of what you specified with error_reporting();. When using @ to suppress errors or warnings, they still go to the custom error handler.

To respect error/warning/notice suppression whilst in your custom PHP error handler you need…

PHP elephant

Enable error reporting and display PHP errors

If you’re likely to be on, you may often encounter people asking for help on a PHP problem where a script stops without an error message. This is because the defaults changed with newer PHP versions not to be in debug mode on starting up. Enable errors showing up in PHP: