E_ALL ^ E_NOTICE is the default error level set in the php.in file.
It simply mean, "Report all errors except E_NOTICE".
error_reporting(E_ALL ^ E_NOTICE);
If you just want to apply some specific level of errors, you can use following as option.
error_reporting(E_ERROR | E_WARNING | E_PARSE);
Here we are telling PHP to show only errors related to E_ERROR, E_WARNING and E_PARSE. Rest of the error types will be ignored.
If you want to turn off all types of error reporting,
error_reporting(0);
or wants to report all types of PHP errors,
error_reporting(E_ALL); //this will not include error type E_STRICT
error_reporting(-1); // this will include E_STRICT as well.
For more details about error_reporting, refer following link of PHP manual,
http://php.net/manual/en/function.error-reporting.php
To see all types of error level (predefined) constants, refer
http://www.php.net/manual/en/errorfunc.constants.php
No comments:
Post a Comment