• XEN DEVELOPMENT is a developer's resource for new developers wanting to build XenForo 2 add-ons. Experienced developers are also welcome to share their experienes and knowledge. This site is not affiliated with XenForo or a replacement for the official XenForo developer forums.

Solved Is the closing PHP bracket required?


Flight Director
Staff member
Lifetime License
Self Reported Skill Level
3.00 star(s)
The opening PHP tag is <?php and belongs at the top of a PHP page; however, the closing tag ?> is not included in the ending of the file which is pure PHP.

From the PHP Manual:
If a file is pure PHP code, it is preferable to omit the PHP closing tag at the end of the file.
According to the PSR-2 Coding Style:
All PHP files MUST use the Unix LF (linefeed) line ending.

All PHP files MUST end with a single blank line.

The closing ?> tag MUST be omitted from files containing only PHP.