For Programmers: Free Programming Magazines  


Home > Archive > PHP Documentation > September 2005 > cvs: phpdoc /en/language basic-syntax.xml









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author cvs: phpdoc /en/language basic-syntax.xml
Gabor Hojtsy

2005-09-27, 6:57 pm

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/...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>
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com