Possible Duplicate:
PHP closing tag
I’ve read recently that the ?> should be omitted from files that contain ONLY PHP
In fact even the Zend Framework code standard strongly discourages using ?> in files containing only PHP because:
For files that contain only PHP code, the closing tag (“?>”) is never
permitted. It is not required by PHP, and omitting it´ prevents the
accidental injection of trailing white space into the response.
Is the injection of trailing white space really that bad? And it is really a hideous crime to not omit the ?> from files containing only PHP? It simply seems unnatural for me to do so.
If you inject white space in an include and then try to use
header()(or something else that depends on running before content is output) then you’ll be entering debug hell. This is a quick and easy technique for avoiding that.