PHP Weekly
PHP closing tags….Don’t need them, so don’t use them. At least in files that have nothing but PHP code in them. Here’s a quote from the Zend Programmers Guide:“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 whitespace into the response.” Have you even gotten that “headers already sent” error? Since this is often caused by trailing white space in your include files, leaving off the closing tag will prevent that form happening.Thanks all for now.
Tags: PHP