Default Error Reporting Level is E_ALL in PHP 8.0

PHP has error_reporting directive that specifies which type of errors to report. If error reporting level explicitly not set, default value will be used. For example, we can set error_reporting in php.ini file or at runtime using error_reporting function.

In PHP 5.3 or newer versions but prior to PHP 8.0, the default error_reporting level was:

error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED

This means that all type of errors are reported except E_NOTICE, E_STRICT, and E_DEPRECATED.

Since PHP 8.0, the default error_reporting level is E_ALL.

error_reporting = E_ALL

Leave a Comment

Your email address will not be published. Required fields are marked *