php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4879 PHP close tag in // comment causes parse error
Submitted: 2000-06-07 22:26 UTC Modified: 2000-06-08 00:09 UTC
From: stephenc at dealnews dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 Latest CVS (07/06/2000) OS: Red Hat Linux 6.1
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: stephenc at dealnews dot com
New email:
PHP Version: OS:

 

 [2000-06-07 22:26 UTC] stephenc at dealnews dot com
When the ?> tag is in a comment block, it gets parsed as part of the script, not the comment.  If the <?php is on the same line, it doesn't have any effect and still gives a problem.  Sample code for problem:

// If the new config file has the beginning 
// <?php but not the closing ?> due to an 
// onforseen file problem, delete the bad file
// before it is included in the next run and 
// causes problems

However, if the above comment section were enclosed between /* .... */, it works fine.  It just seems to be with the // comment style

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-06-08 00:09 UTC] danbeck at cvs dot php dot net
This is normal behavior and is documented in the manual at:

http://www.php.net/manual/language.basic-syntax.comments.php3

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Feb 06 01:01:33 2025 UTC