hide E_NOTICE, E_WARNING, E_DEPRECATED or program under E_ALL?

0

I have been programming php for a year and a half, and I have been programming for a week under error_reporting (E_ALL) covering the errors of variables / undefined 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 all the errors ( E_ALL )?

    
asked by Angel Zambrano 14.01.2018 в 00:10
source

1 answer

0

It must be developed with the highest level of error information activated. With this we can avoid an important part of possible errors in production, since even warnings and notifications that could not make the application fail at any given time will fill the log of errors of the server what can make us more complicated to find errors in a given moment or offer an information that should be hidden in case of being able to be accessed. Likewise. Practices such as the use of @ in front of functions to mute errors during execution are discouraged.

It should be programmed with the minimum of errors and this means that we should avoid them as much as possible and if there are, 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 their control during the life cycle of the application, such as exception control, log system, feedbacks, etc.

    
answered by 14.01.2018 / 00:34
source