mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
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
This commit is contained in:
parent
ee05536337
commit
fdbbac8403
1 changed files with 9 additions and 3 deletions
|
@ -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 @@ if ($expression) {
|
|||
?>
|
||||
|
||||
<?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>
|
||||
|
|
Loading…
Reference in a new issue