In PHP, errors are usually reported. The following describes how to set the error report level for PHPerror_reporting. Set the error log report level.
In PHP, errors are usually reported. The following describes how to set the error report level for PHP error_reporting.
The error log report Level Settings. in some cases, some errors cannot be displayed due to the error level settings. for this function, you must understand the error log report Level. the following levels are provided:
PHP error_reporting is used to set the error message return level. the level parameter is an integer bitmask. See the following table.
Mask value
1 E_ERROR
2 E_WARNING
4 E_PARSE
8 E_NOTICE
16 E_CORE_ERROR
32 E_CORE_WARNING
0 close error report
E_NOTICE indicates that the file is generally not recorded and used only when the program has an error, for example, an attempt to access a variable that does not exist or call stat () to view a file that does not exist.
E_WARNING is usually displayed, but the program execution will not be interrupted. This is effective for debugging. For example, call ereg () in a problematic general notation ().
E_ERROR is usually displayed and the program execution is interrupted. This mask cannot be used to trace memory configurations or other errors.
E_PARSE parses errors from the syntax.
E_CORE_ERROR is similar to E_ERROR, but does not include errors caused by the PHP core.
E_CORE_WARNING is similar to E_WARNING, but does not include PHP core error warnings.
The above is the detailed usage of PHP error_reporting.