[wp-trac] [WordPress Trac] #10633: Omit closing PHP tag at the end of a file when using include() or require()

WordPress Trac wp-trac at lists.automattic.com
Fri Sep 25 08:52:43 UTC 2009


#10633: Omit closing PHP tag at the end of a file when using include() or require()
------------------------------------+---------------------------------------
 Reporter:  hakre                   |        Owner:          
     Type:  enhancement             |       Status:  reopened
 Priority:  normal                  |    Milestone:          
Component:  General                 |      Version:  2.8.4   
 Severity:  normal                  |   Resolution:          
 Keywords:  has-patch dev-feedback  |  
------------------------------------+---------------------------------------
Changes (by hakre):

  * status:  closed => reopened
  * resolution:  wontfix =>


Comment:

 Replying to [comment:8 westi]:
 > Replying to [comment:5 hakre]:
 > > Replying to [comment:4 westi]:
 > > > I don't see the need for this except possible on user-editable
 files.
 > > Do you want to say that good coding practices are actually not
 counting?
 > >
 >
 > This is not good coding practice IMHO.

 IMHO this is good coding practice but I won't let my personal opinion
 count that much. Therfore I suggested to go with the suggestion of many
 others, undergne scrunity and publicly documented on php.net. Let's put
 this on a more professional level then personal opinions.

 From all the reasons argued against the suggestion to remove "?>" at the
 end, not much is left. For that argument that it marks the EOF, I strongly
 suggest for the case to have "?>" at the end to excplicitly add an
 additional comment to every file that this is the end of the file, because
 even partially transfered files might end with an "?>" and they are
 acutally partially transfered. If this is really the problem that users
 are asking questions if everything is right.

 Anyway, having this documented properly in the coding guidelines (which
 could get a better controlled application to the source anyway) would help
 us all with little effort. Even users who do not fully understand how PHP
 is working can be directed there to give them a read.

 I reopen this because this still can get enhancement in any way.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10633#comment:11>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list