[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:46:01 UTC 2009


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

Comment(by hakre):

 Replying to [comment:9 johnbillion]:
 > "so unwanted whitespace will not occur at the end of files"
 >
 > Forgive me for asking, but how can whitespace appear at the end of a
 file after a closing PHP tag? Surely if it's not there now, it's not going
 to just appear?

 if there are whitespace chars like spaces, tabs, newlines etc (everything
 that counts as a whitespace in HTML mainly) after the closing "?>" (often
 added by editors, like a newline) according to the php documentation (and
 against what was said here) is infact output by the php interpreter to the
 client.

 as you can see (and as it answers your questions): it's just output
 because it is in the file.

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


More information about the wp-trac mailing list