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
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: 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 17:01:58 2024 UTC