How to turn on/off php errors
Example how to turn on/off php errors on website. Simple way enable/disable php erros, error_reporting explanation ant example how to use it. Display all PHP errors on website.
Turn off all error reporting
error_reporting(0);
Report only simple php errors
error_reporting(E_ERROR | E_WARNING | E_PARSE);
Reporting all errors except ~E_NOTICE
error_reporting(E_ALL & ~E_NOTICE);
Reporting all php errors
error_reporting(E_ALL);
or
error_reporting(-1);
or
ini_set('error_reporting', E_ALL);
or
ini_set("display_errors", 1);