PHP 4.0 Bug #6653: Parser possibly broken. Doesn't respect comments.
| From: | bdonor at westnet dot com | Date: | Mon, 11 Sep 2000 00:19:30 +0000 |
| Subject: | PHP 4.0 Bug #6653: Parser possibly broken. Doesn't respect comments. | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-32852@lists.php.net to get a copy of this message | ||
From: bdonor@westnet.com
Operating system: Redhat Linux
PHP version: 4.0.2
PHP Bug Type: *General Issues
Bug description: Parser possibly broken. Doesn't respect comments.
I have a piece of code like this:
<?php
// <?=$Username?> Prints the username.
// <?=$Password?> Prints the password.
// <?=$AccountType?> Prints the account type.
?>
I assumed that all of this would be considered a comment and not executed (this was so our webmaster
could just look at the top of our pages and see how to output the values he needed).
Unfortunately it prints this:
Prints the username. // Prints the password. // Prints the account type.
It treats the ?> inside the first comment as the end of a PHP block so the rest is just output to
the screen (assuming it is HTML). Shouldn't the parser ignore this whole line?
Forgive my ignorance if this is not how it is designed to work.
Thank you,
Tim Mattison
bdonor@westnet.com