I've been programming in php for a year and a half and I've been programming for exactly 1 week under error_reporting (E_ALL)
covering the errors of undefined variables/arrays and among other "minor" problems, but is it necessary to omit the E_NOTICE
, E_WARNING
and E_DEPRECATED
, or is it advisable to program throwing me all the errors ( E_ALL
)?
It must be developed with the maximum level of error information activated. With this we can avoid an important part of possible errors in production, since even warnings and notifications that might not cause the application to fail at a given moment will fill the server error log, which can make it more difficult for us to find errors in a given time or offer information that should be hidden if it can be accessed. Likewise. Practices such as using @ in front of functions to silence errors during execution are discouraged .
It must be programmed with the minimum of errors and this means that we must avoid them as much as possible and if there are any, try to find them and correct them in the early stages of development. In addition to all this, one or more systems must be used that allow its control during the life cycle of the application, such as exception control, log system, feedback, etc.