Neal Chester

Home Articles Dev Journal Best practice: Don’t close your PHP tags

Best practice: Don’t close your PHP tags

In WordPress development, I ran into the problem of having white space print at the beginning of the HTML documents. It causes tones of problems with import/export and sitemap plugins. If the PHP isn’t including some HTML, CSS, of JS (which needs to be closed), I don’t need to add the ?> to the end of the .php file.