Reporting deprecations, notices, warnings and errors

Updated: 06 May 2024

Turn on reporting

error_reporting(E_ALL);
ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
ini_set('log_errors', 1);
ini_set('error_log', 'php-error.log');

Check your settings

trigger_error('This is E_USER_DEPRECATED', E_USER_DEPRECATED);
trigger_error('This is E_USER_NOTICE', E_USER_NOTICE);
trigger_error('This is E_USER_WARNING', E_USER_WARNING);
trigger_error('This is E_USER_ERROR', E_USER_ERROR);

Leave a comment