Error Reporting Level for PHP Development

While there are a total of 11 error reporting levels for PHP, the combination I generally use the most often would be

error_reporting (E_ALL | E_STRICT);

The E_ALL argument is somewhat of a misnomer since it does not really include all error types. E_ALL does not include the E_STRICT error type which indicates whether your existing code (which runs perfectly now) may have a problem in future versions of PHP. Although its a never-ending race, developers should still try to future-proof their code as much as possible.

Leave a Reply

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