note 33309 rejected from language.basic-syntax by didou
| From: | didou@php.net | Date: | Sun, 12 Oct 2003 02:44:47 +0000 |
| Subject: | note 33309 rejected from language.basic-syntax by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-58319@lists.php.net to get a copy of this message | ||
Note Submitter: wikiz@studentas.lt
----
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?:).