Most frameworks currently have the ability to use various application parameters for use in production and development.
In production mode (when the site is used by customers) errors should not be visible for security and design reasons. Therefore, you often include log_errors and display_errors. When a fatal error occurs, the user gets something like "Something went wrong, we immediately put our best people on it." It makes no sense to show the user some strange number, for example, "Error code 823." Use cron worker to send you an error log or simply check the log manually and make sure that the error messages are detailed enough for you to track the error.
In development mode (when you start the site locally during development), you probably want to see errors as soon as they appear. Therefore, you enable display_errors. You probably won’t mind if the design breaks, and I hope you understand what is happening.
Error messages are a programmer's best friend, but your users should never try them out. If this happens, make sure the user gives us reasonable feedback, not just a blank page or a random error code.
source share