php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10311 parse error generated for comment
Submitted: 2001-04-12 15:50 UTC Modified: 2001-04-12 16:15 UTC
From: slyder at earendel dot org Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.0.4pl1 OS: Solaris 5.7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: slyder at earendel dot org
New email:
PHP Version: OS:

 

 [2001-04-12 15:50 UTC] slyder at earendel dot org
//$line = preg_replace("/<?[ _0-9A-Za-z\$\?\&\"\=;]+QBUYURLQ[ _0-9A-Za-z\$\?\&\"\=;]+?>/", $buyurl, $line);

ok pretend thats all one line. the problem is that when using c++ style comments, I get a parse error @ line [length of file + 1]. using c style comments makes it go away. the point of the code it was to replace the php part of a line that contained QBUYURLQ in it w/ just the url. it's no longer needed, but took a while to figure out that a comment was generating a parse error :)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-04-12 16:15 UTC] cnewbill@php.net
This is expected behavior.  Not a bug.

The part of the expression that is causing the problem is ?>.  Try just having // ?>, it will do the same thing.  PHP interprets this as the end of the code block.

An example of why this is so:

<?php print $value; // print value ?>

-Chris
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC