ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> phpdoc
phpdoc
[PHP-DOC] cvs: phpdoc /en/language basic-syntax.xml
by Gabor Hojtsy other posts by this author
Sep 27 2005 11:22AM messages near this date
[PHP-DOC] 1 | Re: [PHP-DOC] cvs: phpdoc /en/language basic-syntax.xml
goba		Tue Sep 27 14:22:19 2005 EDT

  Modified files:              
    /phpdoc/en/language	basic-syntax.xml 
  Log:
  last PHP closing tag is not required:
   - give an example
   - give better reasons on when it might be helpful
  
http://cvs.php.net/diff.php/phpdoc/en/language/basic-syntax.xml?r1=1.46&r2=1.47&ty=u
Index: phpdoc/en/language/basic-syntax.xml
diff -u phpdoc/en/language/basic-syntax.xml:1.46 phpdoc/en/language/basic-syntax.xml:1.47
--- phpdoc/en/language/basic-syntax.xml:1.46	Sun Aug 21 09:08:21 2005
+++ phpdoc/en/language/basic-syntax.xml	Tue Sep 27 14:22:19 2005
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?> 
-<!-- $Revision: 1.46 $ --> 
+<!-- $Revision: 1.47 $ --> 
  <chapter id="language.basic-syntax"> 
   <title> Basic syntax</title>
   <sect1 id="language.basic-syntax.phpmode"> 
@@ -145,14 +145,20 @@
 ?> 
 
 <?php echo 'This is a test' ?> 
+
+<?php echo 'We omitted the last closing tag';
 ]]> 
      </programlisting> 
     </informalexample> 
     <note> 
      <para> 
       The closing tag of a PHP block at the end of a file is optional, 
-      and in some cases omitting it is helpful when using output buffering and 
-      <function> include</function> or <function>require</function>.
+      and in some cases omitting it is helpful when using <function> include</function>
+      or <function> require</function>, so unwanted whitespace will
+      not occur at the end of files, and you will still be able to add
+      headers to the response later. It is also handy if you use output
+      buffering, and would not like to see added unwanted whitespace
+      at the end of the parts generated by the included files. 
      </para> 
     </note> 
    </para>  
Thread:
Gabor Hojtsy
Derick Rethans
Gabor Hojtsy

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved