Bug #10311 Updated: parse error generated for comment

From: Date: Thu, 12 Apr 2001 20:15:31 +0000
Subject: Bug #10311 Updated: parse error generated for comment
Groups: php.dev 
Request: Send a blank email to php-dev+get-51511@lists.php.net to get a copy of this message
ID: 10311 Updated by: cnewbill Reported By: slyder@earendel.org Old-Status: Open Status: Bogus Bug Type: Scripting Engine problem PHP Version: 4.0.4pl1 Assigned To: Comments: 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 Previous Comments: --------------------------------------------------------------------------- [2001-04-12 15:50:12] slyder@earendel.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 :) --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=10311&edit=2

« previous php.dev (#51511) next »