No PHP closing tag

No PHP closing tag, a forum discussion on Jojo CMS. Join us for more discussions on No PHP closing tag on our General Discussion forum.

Back to Forum Index : Back to General Discussion   RSS

1 Jan 2008
Posts: 1

Hi Harvey,

First of all, I wish you a very good new year!

I am curious: why don't you end the PHP files with a PHP closing tag?


1 Jan 2008
Posts: 5

Happy new year to you too Eduardo :)

Closing tags are actually optional in PHP, and have been for some time. If you have whitespace after the closing ?> php tag then this can cause all kinds of havoc when you try to send headers to the browser.

We say it's easier to just not use closing tags than to have to remember to trim any whitespace after the closing tag. It took me a while to get into the habit, but it works fine.
Back to Forum Index : Back to General Discussion   RSS
You must be logged in to post a reply

You need to Register or Log In before posting on these forums.