Home  >  Article  >  Backend Development  >  PHP exception level analysis

PHP exception level analysis

小云云
小云云Original
2018-03-02 09:39:061085browse

This article mainly shares with you the PHP exception level analysis, hoping to help everyone.

Deprecated The lowest level error (not recommended, not recommended)
It will appear when using some expired functions, and the program will continue to execute
Notice Notice Level error
Will appear when using some undefined variables, constants or array keys without quotation marks, the program continues to execute
Waning Warning level error
There is a problem with the program, need Modify the code! ! ! The program continues to execute
Fatal Error Error level error
The program reports an error directly and the code needs to be modified! ! ! To interrupt the execution of the program, you can use the register_shutdown_function() function to trigger a function before the program terminates
Parse error Grammar parsing error
An error is reported during the syntax check phase, and the code needs to be modified! ! ! Interrupting program execution, nothing can be done except modifying the ini file and writing error information to the log
E_USER_Related errors
User-defined errors, the user manually throws errors, proceed Custom error handling
PHP exception and error throwing
Exception throw: throw new Exception('Some Error Message');
Error throw: trigger_error()## Errors triggered by #trigger_error() will not be caught by try-catch exception catching statements.

Related recommendations:

Exception level in php

The above is the detailed content of PHP exception level analysis. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn