PHP 4.0 Bug #6653 Updated: Parser possibly broken. Doesn't respect comments.

From: Date: Mon, 11 Sep 2000 00:25:46 +0000
Subject: PHP 4.0 Bug #6653 Updated: Parser possibly broken. Doesn't respect comments.
Groups: php.dev 
Request: Send a blank email to php-dev+get-32854@lists.php.net to get a copy of this message
ID: 6653 Updated by: joey Reported By: bdonor@westnet.com Status: Closed Bug Type: *General Issues Assigned To: Comments: This is intentional. See: http://php.net/manual/language.basic-syntax.comments.php Use /* */ instead. Previous Comments: --------------------------------------------------------------------------- [2000-09-10 20:19:30] bdonor@westnet.com 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 --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=6653

« previous php.dev (#32854) next »