RE: [PHP] PHP parser BUG - comments

2001-09-24 Thread Mark Roedel

> -Original Message-
> From: Krzysztof Kocjan [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, September 24, 2001 9:32 AM
> To: [EMAIL PROTECTED]
> 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:
>  
> print( 'test' );
> //print( "" );

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( "" );*/
> ?>

...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 

--
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]




[PHP] PHP parser BUG - comments

2001-09-24 Thread Krzysztof Kocjan

Hi,

I'm using PHP/4.0.6. I suppose I found bug in PHP parser. There is PHP
code:
" );
/*print( "" );*/

?>

which produces strange output in www browser:
test" );
/*print( "aaa" );*/

?>

I my opinion there should be only text 'test' at www browser window.
Thank You for any comments.

Krzysztof Kocjan


--R--E--K--L--A--M--A---
Zapal lampe w sypialni!
Swiatlo wzmaga apetyt na seks.
http://www.polki.interia.pl/seks/erotyka


-- 
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]