note 33309 added to language.basic-syntax
| From: | wikiz at studentas dot lt | Date: | Sun, 22 Jun 2003 11:44:49 +0000 |
| Subject: | note 33309 added to language.basic-syntax | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-50809@lists.php.net to get a copy of this message | ||
I've discovered that you don't need to close the code with "?>", if there
will (should) be end of file after it. for example, on my PHP 4.2.3:
-----------
<?php
echo "hello world";
?>
-----------
is identical to
-----------
<?php
echo "hello world";
-----------
This might help avoiding problems with "output started, headers already sent" bug - when
you include a file that has some trailing output after closing tag "?>", the include
starts the output. Not closing code might help preventing the bug.. but it's undocumented
feature (or bug?:).
----
Manual Page -- http://www.php.net/manual/en/language.basic-syntax.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33309
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33309&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33309&report=yes