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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 11:01:30 2024 UTC