> -----Original Message-----
> From: Krzysztof Kocjan [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, September 24, 2001 9:32 AM
> 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%

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 

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to