We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6228
    • 249 Posts
    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
      • 28042 ☆ 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.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org