• Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: Major Major
    • 3.1.0-a1
    • 3.1.0-dev
    • None
    • None

      For phpbb 3.1 we should drop ?> php closing tags in all php files.

      They are not required (http://www.php.net/manual/en/language.basic-syntax.instruction-separation.php) when they are at the end of file. There are multiple reasons to not have them:

      1. No worries about outputting whitespace before headers by accident.
      2. At least the 'patch' utility adds newline at end of file when applying patches.
      3. Various utilities such as sed add newline at end of file, when php files are processed with them.
      4. Diffs without newlines at end of file have an additional line stating the absence of newline.

      There are several posts on the net advocating against using closing php tags:

      http://phpstarter.net/2009/01/omit-the-php-closing-tag/
      http://choosetheforce.blogspot.com/2008/05/should-you-close-that-php-tag.html

      Zend Framework prohibits (http://framework.zend.com/manual/en/coding-standard.php-file-formatting.html) closing php tags.

      Discussion: http://area51.phpbb.com/phpBB/viewtopic.php?f=3&t=32589

            igorw Igor Wiedler [X] (Inactive)
            Oleg Oleg [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: