#24209 [Opn->Bgs]: Closing PHP tag and line comment
| From: | rasmus@php.net | Date: | Mon, 16 Jun 2003 20:05:37 +0000 |
| Subject: | #24209 [Opn->Bgs]: Closing PHP tag and line comment | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-42080@lists.php.net to get a copy of this message | ||
ID: 24209
Updated by: rasmus@php.net
Reported By: nicolas dot sandri at free dot fr
-Status: Open
+Status: Bogus
Bug Type: Output Control
Operating System: FreeBSD & Mac OS X
PHP Version: 4.3.2
New Comment:
Known and expected. Probably even documented somewhere too.
Previous Comments:
------------------------------------------------------------------------
[2003-06-16 15:03:20] nicolas dot sandri at free dot fr
Description:
------------
See the code, end of line comment "//" and "##" does
not work with the PHP ending tag.
It could be not very important but, if you have a line
like that :
echo "<?xml version=\"1.0\"?>";
You comment it with "//" and now the PHP script exit
since it found the "?>" into line.
The only way is to use the "/* */" comment.
Reproduce code:
---------------
<?
echo "I'm ";
// ?>
echo "outside the PHP script";
?>
Expected result:
----------------
I'm outside the PHP script
Actual result:
--------------
I'm echo "outside the PHP script"; ?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=24209&edit=1