php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8203 not proper one-line comment handling in <% %> tags
Submitted: 2000-12-12 00:22 UTC Modified: 2000-12-19 07:57 UTC
From: antonio dot b at infinito dot it Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0.3pl1 OS: Red Hat Linux 6.2
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: antonio dot b at infinito dot it
New email:
PHP Version: OS:

 

 [2000-12-12 00:22 UTC] antonio dot b at infinito dot it
why this are legal:
<?php echo "comment1"; # comment1 ?>
<?php echo "comment2"; // comment2 ?>
<? echo "comment3"; # comment3 ?>
<? echo "comment4"; // comment4 ?>

but the PHP parser won't accept these?

<% echo "comment1"; # comment1 %>
<% echo "comment2"; // comment2 %>

i think this is a lack in the parser code which controls
the # and // comment style. Am I right? Can be fixed?

Of course a workaround is:

<% echo "comment1"; # comment1
%>
<% echo "comment2"; // comment2
%>

sorry for my bad english (i'm italian).

hope this is useful

best regards

Antonio Bonifati

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-12-19 07:57 UTC] stas@php.net
Fixed in CVS, thanks.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Fri Oct 09 01:00:01 2026 UTC