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>