Show / Hide PHP Errors

Thursday 19th, Nov, 2015 | #



Simple guide to show and hidden errors in php.

PHP allows you to configure how alerts or error messages are displayed to the user. This is extremely useful when it comes to debugging the code.



//Show All Errors
error_reporting(E_ALL);
ini_set('display_errors', 1);


//Hide Errors
error_reporting(0);

//All Errors Except E_NOTICE
error_reporting(E_ALL ^ E_NOTICE);