php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11330 Regexp code cannot be commented out
Submitted: 2001-06-07 11:44 UTC Modified: 2001-06-07 14:21 UTC
From: bf at ez dot no Assigned:
Status: Closed Package: Regexps related
PHP Version: 4.0.5 OS: Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: bf at ez dot no
New email:
PHP Version: OS:

 

 [2001-06-07 11:44 UTC] bf at ez dot no
I have code like this:
$tmpPage = preg_replace( "/(<header\s*?>)/", "<header 
level=\"1\">", $tmpPage );

Ok, I want to comment this code out like:
//$tmpPage = preg_replace( "/(<header\s*?>)/", "<header 
level=\"1\">", $tmpPage );

this makes php angry. It'e reproducable, just paste the 
line above in your script and strange things will happen.

PS: The code works without the comment, so the code is 
valid.



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-07 14:21 UTC] sniper@php.net
http://www.php.net/manual/en/language.basic-syntax.comments.php

Use /* */ style comments instead and you won't have 
this kind of problems.  ?> in your code is seen as end
of PHP block. 

Not a bug.

--Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC