Sitemap
Hug Growth

Hug Growth

Bootstrap, PHP, WordPress, CodeIgniter, Laravel, React JS, Vue JS, and Flutter Website:- https://huggrowth.com/

PHP | Error Levels

2 min readJul 18, 2021

--

Usually, whenever the PHP engine encounters a problem that prevents a script from running properly it generates an error message. There are sixteen different error levels and each level is represented by an integer value and an associated constant. Here’s a list of error levels

E_ERROR (Value:- 1)

A fatal run-time error, that can’t be recovered from. The execution of the script is stopped immediately.

E_WARNING (Value:- 2)

A run-time warning. It is non-fatal and most errors tend to fall into this category. The execution of the script is not stopped.

E_PARSE (Value:- 4)

The compile-time parse error. Parse errors should only be generated by the parser.

E_NOTICE (Value:- 8)

A run-time notice indicates that the script encountered something that could be an error, although the situation could also occur when running a script normally.

E_CORE_ERROR (Value:- 16)

A fatal error occurs during the PHP’s engine initial startup. This is like an E_ERROR, except it is generated by the core of PHP.

E_CORE_WARNING (Value:- 32)

A non-fatal error occurs during the PHP’s engine initial startup. This is like an E_WARNING, except it is generated by the core of PHP.

E_COMPILE_ERROR (Value:- 64)

A fatal error that occurs while the script was being compiled. This is like an E_ERROR, except it is generated by the Zend Scripting Engine.

Get Hug Growth’s stories in your inbox

Join Medium for free to get updates from this writer.

E_COMPILE_WARNING (Value:- 128)

A non-fatal error occurs while the script was being compiled. This is like an E_WARNING, except it is generated by the Zend Scripting Engine.

E_USER_ERROR (Value:- 256)

A fatal user-generated error message. This is like an E_ERROR, except it is generated by the PHP code using the function trigger_error() rather than the PHP engine.

E_USER_WARNING (Value:- 512)

A non-fatal user-generated warning message. This is like an E_WARNING, except it is generated by the PHP code using the function trigger_error() rather than the PHP engine

E_USER_NOTICE (Value:- 1024)

A user-generated notice message. This is like an E_NOTICE, except it is generated by the PHP code using the function trigger_error() rather than the PHP engine.

E_STRICT (Value:- 2048)

Not strictly an error, but triggered whenever PHP encounters code that could lead to problems or forward incompatibilities

E_RECOVERABLE_ERROR (Value:- 4096)

A catchable fatal error. Although the error was fatal, it did not leave the PHP engine in an unstable state. If the error is not caught by a user-defined error handler (see set_error_handler()), the application aborts as it was an E_ERROR.

E_DEPRECATED (Value:- 8192)

A run-time notice indicating that the code will not work in future versions of PHP

E_USER_DEPRECATED (Value:- 16384)

A user-generated warning message. This is like an E_DEPRECATED, except it is generated by the PHP code using the function trigger_error() rather than the PHP engine.

E_ALL (Value:- 32767)

All errors and warnings, except level E_STRICT before PHP 5.4.0.

--

--

Hug Growth
Hug Growth

Written by Hug Growth

Bootstrap, PHP, WordPress, CodeIgniter, Laravel, React JS, Vue JS, and Flutter Website:- https://huggrowth.com/