Error level in PHP, PHP error level
In the course of PHP programming, you will encounter more or less error reminders, it is these error hints, guide us to write cleaner code, today first write our main list of error types, first dig pits, write about PHP errors and anomalies related knowledge, slowly pits.
Deprecated lowest level error, program continues execution
Notice notification level errors such as using undeclared variables directly, the program continues execution
Warning Warning Level error, may not get the desired result
Fatal error fatal level error fatal level errors, program does not execute down
Parse error syntax parsing errors, highest level errors, and even other error messages are not rendered
E_user_ related error user settings related errors
Use the Trigger_error () function to set a user-level error/warning/notice information
How do I set the error level?
error_reporting ( -1) shows all errors,error_reporting (0) masks all errors. Ini_set (' error_reporting ', 0) also masks all errors. You can set error_reporting in the php.ini file to cause the script to display or not display some errors. Ini_set (' display_errors ', ' on ') displays an error.
Note:the error_reporting () setting reports what errors, while Ini_set (' display_errors ', ' on ') sets whether the output is incorrect. Thus error_reporting (-1) and Ini_set (' Display_errors ', 0) can be used as Setup logs: reports errors and does not output.
Example: error_reporting (e_all&~e_notice) does not display notification level errors. "~" means no.
http://www.bkjia.com/PHPjc/1048774.html www.bkjia.com true http://www.bkjia.com/PHPjc/1048774.html techarticle error level in PHP, PHP error level in the course of PHP programming, you are bound to encounter more or less error reminders, it is these error hints, guide us to write cleaner code ...