I’m doing some development work on a Revo installation, and have noticed that quite a few Revo PHP files have no closing PHP tags.
I understand that pure PHP files work fine with only the opening tag. But is there an underlying functional reason why the end tag is omitted?
My OCD wants to add end tags to all Revo files for the sake of good practice, but I’m resisting.
Mike
lo9on.com
MODx Evolution/Revolution | Remote Desktop Training | Development
-
☆ A M B ☆
- 24,524 Posts
It’s done mostly to avoid the errors caused by having anything at all after the closing ?> tag, so if an accidental line feed or space sneaks into the file it won’t break it. Use closing tags if you want/need to; it doesn’t make any difference really.