coding

Should I disable PHP warnings and notices?

This is a reposting of what I wrote on the Acquia Dev Center blog in 2016, Should I disable PHP warnings and notices?.

Drupal onscreen logged PHP error messages and warnings

Many developers who work on Drupal (or other web/PHP) projects have error reporting disabled in their local or shared dev environments, for a variety of reasons—some don't know how to enable it, some are annoyed by the frequency of notices, warnings, and errors, and some don't like to be reminded of how many errors are logged!

There are a few important reasons you should make sure to show all errors when developing, though:

W3C Validation & Why You Should Use It

Whenever you're designing a website, one of your primary goals, besides communicating the mission of the organization for whom the website is being made, should be to make the website accessible to all visitors, no matter what kind of computer or browser they have, and no matter what kind of disabilities they have (whether it be blindness, deafness, or other problems).

Luckily for you, there's a free and easy-to-use tool on the web that lets you check how well your website conforms to coding standards:

W3C Markup Validation Service Banner

The W3C generously provides this service to further their mission of having an open, accessible and free web. The tool is dead simple to use: just type in your website's URL, and click Validate. Errors will then show up, and you can go back to your source code and fix the little mistakes you've made. But there's a lot more about Validation that needs to be said!