ID: 31672 Updated by: [EMAIL PROTECTED] -Summary: one-line comment behave differently with </script> closing tag Reported By: tomc at wanadoo dot fr -Status: Bogus +Status: Verified -Bug Type: Output Control +Bug Type: Scripting Engine problem -Operating System: Windows XP +Operating System: * -PHP Version: 4CVS-2005-01-23 +PHP Version: 4CVS, 5CVS (2005-01-24) New Comment:
This is valid bug, all other closing tags ( ?>, %> ) work fine in same situation, as the provided test case proves. Previous Comments: ------------------------------------------------------------------------ [2005-01-24 00:52:00] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php See: http://www.php.net/manual/en/language.basic-syntax.comments.php ------------------------------------------------------------------------ [2005-01-23 23:08:59] tomc at wanadoo dot fr Description: ------------ in the manual : "The one-line comment styles actually only comment to the end of the line or the current block of PHP code, whichever comes first." Everything is working as described in the manual except that if you are using the </script> closing tag, PHP will consider the end of the PHP block as part of the comment. Reproduce code: --------------- <?php // line comment ?> echo "out of PHP" <? // line comment ?> echo "out of PHP" <% // line comment %> echo "out of PHP" <script language="php">// line comment</script> echo "how come I'm still in PHP ?\n" ; </script> echo "out of PHP" Expected result: ---------------- echo "out of PHP" echo "out of PHP" echo "out of PHP" echo "how come I'm still in PHP ?\n" ; echo "out of PHP" Actual result: -------------- echo "out of PHP" echo "out of PHP" echo "out of PHP" how come I'm still in PHP ? echo "out of PHP" ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31672&edit=1