I\'ve come across a tutorial (reputable one if I may add) where the closing php tag ?>
was omitted. This reminded me of a previous tutorial where the author
Because any whitespace after the final closing tag can cause the script to fail silently, or cause unwanted output to be sent to the browser. Some frameworks such as Zend Framework have incorporated omitting the final closing tag as a recommended practice to application developers using the ZF to help avoid such situations, and as a requirement as per their coding standards:
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.
That said, omitting closing tags is very much a workaround for a problem for which the root cause has not yet been tackled. This blog post asserts the very same.