[wp-hackers] Discussion about Optional Closing PHP tags in the WordPress Library

Jason Webster jason at intraffic.net
Wed Jun 18 14:04:07 GMT 2008

It is in fact, absolutely NOTHING like leaving off the semi colon.

It is good practice for files that only include PHP code. For example, 
it is a _required_ coding standard for a number of PHP projects, 
including the Zend Framework.

Eric Marden wrote:
>> I seem to recall very early in my PHP hacking days being told that I 
>> was _supposed_ to leave a single line break at the end of the file 
>> after the closing "?>"
>>> ...helps prevent (often hard to debug) accidents like the addition 
>>> of trailing whitespace, which will cause, for instance, session 
>>> initialization to fail.
> Requiring you to leave off the closing ?> is just sloppy. At the very 
> least it discourages mindful coding, and being aware of common bugs. 
> Its akin to leaving off the semicolon... you're going to get an error.
> And I have to disagree to the previous poster, these issues are not 
> hard to debug and very easy to diagnose.
> -e
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers

More information about the wp-hackers mailing list