PHP error handling - predefined constants

Predefined constants

Here is a list of the predefined constants used in PHP 5 for error handling : 

Name Type Description value
E_ERROR integer Execution of the script comes to a halt. An example is memory allocation problem. 1
E_WARNING integerExecution of the script is not halted, warnings generated.  2
E_PARSE  integerParse errors generated by parsers during compilation. 4
E_NOTICE  integerRun-time notices which indicated that may be an error took place but may also be a normal course of action. 8
E_CORE_ERROR integer Fatal errors that occur during the initial startup of PHP. 16
E_CORE_WARNING integerWarnings (execution of script is not halted) that occur during PHP's initial startup.32
E_COMPILE_ERROR   integerFatal compile-time errors. 64
E_COMPILE_WARNING   integer Compile-time warnings, execution of script is not halted. 128
E_USER_ERROR   integerUser-generated error message.  256
E_USER_WARNING integerUser-generated warning message.  512
E_USER_NOTICE integer Same as E_NOTICE. Only difference is, trigger_error() function is used here to generate the error message. 1024 
E_STRICT integer User-generated notice message. 2048
E_RECOVERABLE_ERROR  integerCatchable fatal error. 4096
E_DEPRECATED  integerRun-time notices.  8192
E_USER_DEPRECATED  integerUser-generated warning message. 16384
E_ALL  integer All errors and warnings, as supported. Exception level E_STRICT. 30719

All these constants are available in  php.ini of your PHP installation folder.