php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24209 Closing PHP tag and line comment
Submitted: 2003-06-16 15:03 UTC Modified: 2003-06-16 15:05 UTC
From: nicolas dot sandri at free dot fr Assigned:
Status: Not a bug Package: Output Control
PHP Version: 4.3.2 OS: FreeBSD & Mac OS X
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: nicolas dot sandri at free dot fr
New email:
PHP Version: OS:

 

 [2003-06-16 15:03 UTC] 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"; ?>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-16 15:05 UTC] rasmus@php.net
Known and expected.  Probably even documented somewhere too.
 [2003-06-16 15:05 UTC] derick@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

read the docs...
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Feb 05 08:01:30 2025 UTC