From fdbbac840345f38251da1b7d3de64bb554c7704a Mon Sep 17 00:00:00 2001 From: Gabor Hojtsy Date: Tue, 27 Sep 2005 18:22:19 +0000 Subject: [PATCH] last PHP closing tag is not required: - give an example - give better reasons on when it might be helpful git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@197095 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/basic-syntax.xml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/language/basic-syntax.xml b/language/basic-syntax.xml index 57185cd0fb..b4af17cff2 100644 --- a/language/basic-syntax.xml +++ b/language/basic-syntax.xml @@ -1,5 +1,5 @@ - + Basic syntax @@ -145,14 +145,20 @@ if ($expression) { ?> + + 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 - include or require. + and in some cases omitting it is helpful when using include + or require, 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.