Bug #9518 [Opn->Bgs]: Coding Standards should have no characters after ?>
| From: | danielc@php.net | Date: | Fri, 08 Dec 2006 17:29:47 +0000 |
| Subject: | Bug #9518 [Opn->Bgs]: Coding Standards should have no characters after ?> | ||
| References: | 1 | Groups: | php.pear.doc |
| Request: | Send a blank email to pear-doc+get-9022@lists.php.net to get a copy of this message | ||
Edit report at http://pear.php.net/bugs/bug.php?id=9518&edit=1
ID: 9518
Updated by: danielc@php.net
Reported By: michelo at rigadev dot com
-Status: Open
+Status: Bogus
Id: 9518
Type: Bug
Package: Documentation
Operating System: Windows XP
PHP Version: 5.1.2
-Assigned To:
+Assigned To: danielc
New Comment:
You're misunderstanding. The standards are correct and don't cause
problems. Take a look at the PEAR DB files, for example.
Previous Comments:
------------------------------------------------------------------------
[2006-12-01 10:50:08] michelo at rigadev dot com
Description:
------------
The english manual page on Coding Standards file formats,
http://pear.php.net/manual/en/standards.file.php,
states "There should
be one line feed after the closing PHP tag (?>). This means that when
the cursor is at the very end of the file, it should be one line below
the closing PHP tag." I believe this is incorrect as it can lead to
problems if a class file is included before the html headers are sent.
This should be rewritten to state that no characters should appear
before the opening <?php or after the closing ?> including line feeds
and other control characters.
Thanks,
Test script:
---------------
---- source1.php ----
<?php
?>
---- source1.php end ----
---- source2.php -----
<?php
require_once('source1.php')
header("HTTP:/1.0 404 Not Found");
?>
Expected result:
----------------
Warning: Cannot modify header information - headers already sent by
(output started at www.example.com/source1.php:4) in
www.example.com/source2.php on line 3
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=9518&edit=1