|  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
 [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 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-07 14:21 UTC]

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.


PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jul 19 18:01:30 2024 UTC