Error_reporting () sets the PHP error level and returns the current level.
; Error reports are reported by bit. Or add the numbers to get the expected error report level.
; E_all-all errors and warnings
; E_error-fatal runtime error
; E_warning-runtime warning (non-fatal error)
; E_parse-parsing error during compilation
; E_notice-runtime reminder (these are often caused by bugs in your code,
It may also be caused by intentional behaviors. (For example, an uninitialized variable is automatically initialized to
; Use an uninitialized variable instead of an empty string)
; E_core_error-fatal error during PHP startup Initialization
; E_core_warning-warning occurred during PHP startup initialization (non-fatal error)
; E_compile_error-fatal error during compilation
; E_compile_warning-warning during compilation (non-fatal error)
; E_user_error-error message generated by the user
; E_user_warning-user-generated warning message
; E_user_notice-user-generated reminder message
Usage:
Error_reporting (0); // Disable Error Reporting
Error_reporting (e_all ^ e_notice); // display all error messages except e_notice
Error_reporting (e_all ^ e_warning ^ e_notice); // display all error messages except e_warning e_notice
Error_reporting (e_error | e_warning | e_parse); // displays a runtime error, which is the same as error_reporting (e_all ^ e_notice. Error_reporting (e_all); // display all errors