A good programming practice may include debugging option in your header, and only display errors when the script is running in debug mode. Please see an example below:
define('__DEBUG__', FALSE); if (__DEBUG__) { ini_set('display_errors', 1); error_reporting(E_ALL && ~E_NOTICE); }
More information about text formats
Display Errors in DEBUG mode
A good programming practice may include debugging option in your header, and only display errors when the script is running in debug mode. Please see an example below: