RE: [PHP] PHP parser BUG - comments

From: Date: Mon, 24 Sep 2001 21:43:39 +0000
Subject: RE: [PHP] PHP parser BUG - comments
Groups: php.general 
Request: Send a blank email to php-general+get-68608@lists.php.net to get a copy of this message
> -----Original Message----- > From: Krzysztof Kocjan [mailto:kkocjan@poczta.fm] > Sent: Monday, September 24, 2001 9:32 AM > To: php-general@lists.php.net > Subject: [PHP] PHP parser BUG - comments > > > I'm using PHP/4.0.6. I suppose I found bug in PHP parser. There is PHP > code: > <?php > > print( 'test' ); > //print( "<?php print( 'aaa' ); ?>" ); According to http://www.php.net/manual/en/language.basic-syntax.comments.php, a one-line comment only extends to "the end of the line or the current block of PHP code, whichever comes first." In this case, that'd mean that the comment doesn't include the " ); And since the ?> on that line ends the current code block... > /*print( "<?php print( 'aaa' ); ?>" );*/ > ?> ...then these two lines would not be processed by PHP at all, but would be passed to the browser as text. So it appears to me it's working as documented, if not 100% intuitively... --- Mark Roedel | "Blessed is he who has learned to laugh Systems Programmer | at himself, for he shall never cease LeTourneau University | to be entertained." Longview, Texas, USA | -- John Powell

« previous php.general (#68608) next »