Omiting PHP closing tag?

Discussions and requests related to new CMSimple features, plugins, templates etc. and how to develop.
Please don't ask for support at this forums!
Post Reply
svasti
Posts: 1659
Joined: Wed Dec 17, 2008 5:08 pm

Omiting PHP closing tag?

Post by svasti » Thu Jan 22, 2015 8:25 pm

Hi all

I am just reading in the php manual:
http://php.net wrote:If a file is pure PHP code, it is preferable to omit the PHP closing tag at the end of the file.
Why do we still have them in the core files of XH? Should we not better take them out?

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Omiting PHP closing tag?

Post by cmb » Thu Jan 22, 2015 9:05 pm

svasti wrote:
http://php.net wrote:If a file is pure PHP code, it is preferable to omit the PHP closing tag at the end of the file.
Why do we still have them in the core files of XH? Should we not better take them out?
Well, the closing PHP tags are required by the PEAR codings standards. But yes, the PEAR coding standards are somewhat antiquated -- we may consider choosing something else. It's all the same to me. Actually, I rarely if ever had a problem with the closing PHP tags. :)
Christoph M. Becker – Plugins for CMSimple_XH

svasti
Posts: 1659
Joined: Wed Dec 17, 2008 5:08 pm

Re: Omiting PHP closing tag?

Post by svasti » Thu Jan 22, 2015 9:41 pm

cmb wrote:Well, the closing PHP tags are required by the PEAR codings standards.
OK

Post Reply