NYCPHP Meetup

NYPHP.org

[nycphp-talk] Closing Tags or Not Closing Tags, that is my question...

Gary Mort bz-gmort at beezifies.com
Mon Dec 17 21:54:41 EST 2007


mikesz at qualityadvantages.com wrote:
> Hello and Greetings To All,
>
> "The closing PHP tag isn't required and actually stops people breaking
> things. We removed it intentionally, since some customers were adding
> whitespace to the end and getting blank pages / cookie errors."
>
> This was posted by a senior developer for a VERY popular PHP product.
>
> Any body care to comment on this,

Just to fully clarify this, I have seen the same argument put forth for 
a few projects, one thing they all have in common is using ob_start and 
saving all content generated to the buffer, before finally releasing it 
at the end.

Personally, I'm nor a big fan of buffering the output like that because 
it leads to a laggier looking display(when you don't buffer, the page 
loads as it is built, instead of waiting on a blank page untill the page 
is generated and then appearing in one block)

However, I do see the attraction and even necessity for some 
products...like a certain CMS I like to use.  :-)

Personally, I'd be more concerned about the missing comments and 
documentation than a missing closing tag.




More information about the talk mailing list