Startup Errors are Displayed by Default in PHP 8.0

PHP has display_startup_errors directive that specifies whether the errors must be displayed that occurred during PHP startup process. If this directive explicitly not set, default value will be used. For example, we can set display_startup_errors in php.ini file or at runtime using ini_set function.

In versions prior to PHP 8.0, the display_startup_errors was disabled by default:

display_startup_errors = Off

This means that errors occurred during PHP startup process are not displayed.

Since PHP 8.0, the display_startup_errors is enabled by default:

display_startup_errors = On

Recommended to disable display_startup_errors directive in production environment, except for testing and debugging purposes.

Leave a Comment

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