The error log levels in php include E_ALL, E_ERROR, E_RECOVERABLE_ERROR, E_WARNING, E_PARSE, E_STRICT, etc.
The operating environment of this article: windows10 system, php 7.3, thinkpad t480 computer.
The error log levels in php are as follows:
; E_ALL All errors and warnings (except E_STRICT)
; E_ERROR Fatal error. Execution of the script is suspended.
; E_RECOVERABLE_ERROR Most fatal errors.
; E_WARNING Non-fatal runtime error, just a warning, the execution of the script will not stop.
; E_PARSE Compile-time parsing errors, parsing errors should only be generated by the parser.
; E_NOTICE is a reminder generated when the script is running (often caused by some bugs in the scripts we write, such as a certain variable not being defined). This error will not cause the task to be interrupted.
; E_STRICT The reminder message generated when the script is running will include some suggested information thrown by php for us to modify.
; E_CORE_ERROR A fatal error that occurs after php is started
; E_CORE_WARNING A non-fatal error that occurs after php is started, that is Warning message
; E_COMPILE_ERROR Fatal error when php is compiled
; E_COMPILE_WARNING Warning message when php is compiled
; E_USER_ERROR User-generated error
; E_USER_WARNING User-generated warning
; E_USER_NOTICE User-generated reminder
Tips:
& means and
~ means not
| means or
. For example: error_reporting = E_ALL & ~E_NOTICE means the error level is E_ALL and except E_NOTICE
Related video tutorial sharing: php video tutorial
The above is the detailed content of What are the error log levels in php. For more information, please follow other related articles on the PHP Chinese website!