Bug #6329 Updated: Detecting end tag in a comment.

From: Date: Fri, 27 Apr 2001 22:45:48 +0000
Subject: Bug #6329 Updated: Detecting end tag in a comment.
Groups: php.dev 
Request: Send a blank email to php-dev+get-52628@lists.php.net to get a copy of this message
ID: 6329 Updated by: sniper Reported By: patrick@music-images.nl Old-Status: Duplicate Status: Closed Bug Type: Scripting Engine problem PHP Version: 4.0.1pl2 Assigned To: Comments: Previous Comments: --------------------------------------------------------------------------- [2000-08-24 05:38:47] hholzgra@php.net this is documented behavior for '//' and '#' style comments, you might consider to use '/*...*/' instead in this case it is done so that for example <? echo $test; // just testing ?> works --------------------------------------------------------------------------- [2000-08-24 05:27:32] patrick@music-images.nl I commented this line out with a // but after that ?> is interpreted as an end of script remark. Ofcourse this shouldn't happen, to my opinion in a comment nothing should be parsed. <? // onLoad="Javascript:parent.main_view.location='<? echo $base_url . $search_page; ?>';" ?> the output will be: ';" ?> But if I run: <? /* onLoad="Javascript:parent.main_view.location='<? echo $base_url . $search_page; ?>';" */ ?> there will be no output. I ran this through PHP in CGI mode. It does not happen to comments within /* */ comment markers. --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=6329&edit=2

« previous php.dev (#52628) next »