The constants below are always available as part of the PHP core.
The following constants (either the corresponding numerical value or their symbolic name) are used as a bitmask to specify which errors to report. It is possible to use bitwise operators to combine these values or mask out certain types of errors.
The name of the constants can be used within php.ini, instead of the raw numerical values to which they correspond to. However, only the |, ~, ^, !, & operators are understood within php.ini.
It is not possible to use the symbolic names outside of PHP. For example in httpd.conf the computed bitmask value must be used instead.
E_ERROR (int)1E_WARNING (int)2E_PARSE (int)4E_NOTICE (int)8E_CORE_ERROR (int)E_ERROR, except it is generated by the core of PHP. Value of the constant: 16E_CORE_WARNING (int)E_WARNING, except it is generated by the core of PHP. Value of the constant: 32E_COMPILE_ERROR (int)E_ERROR, except it is generated by the Zend Scripting Engine. Value of the constant: 64E_COMPILE_WARNING (int)E_WARNING, except it is generated by the Zend Scripting Engine. Value of the constant: 128E_DEPRECATED (int)8192E_USER_ERROR (int)E_ERROR, except it is generated in PHP code by using the PHP function trigger_error(). Value of the constant: 256Usage of this constant with trigger_error() is deprecated as of PHP 8.4.0. It is recommended to either throw an Exception or call exit() instead.
E_USER_WARNING (int)E_WARNING, except it is generated in PHP code by using the PHP function trigger_error(). Value of the constant: 512E_USER_NOTICE (int)E_NOTICE, except it is generated in PHP code by using the PHP function trigger_error(). Value of the constant: 1024E_USER_DEPRECATED (int)E_DEPRECATED, except it is generated in PHP code by using the PHP function trigger_error(). Value of the constant: 16384E_STRICT (int)2048This error level is unused, and has been deprecated as of PHP 8.4.0.
E_RECOVERABLE_ERROR (int)E_ERROR. Value of the constant: 4096Note: This error level is effectively unused, the only case where this can happen is when interpreting an object as a bool fails. This can only happen for internal objects. The most common example, prior to PHP 8.4.0, is using a GMP instance in a conditional.
E_ALL (int)30719Prior to PHP 8.4, the constant value was: 32767