|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-03-16 02:15 UTC] derp at example dot com
Description: ------------ When a processing instruction end (PIE), i.e., "?>", is encountered in a single-line comment, the PHP parser should handle it more intelligently, thus: If the PIE would, when outside single-line comment context (SLCC), not mark the end of the current PHP code block (e.g., if it occurred inside a string literal), it should not, when inside SLCC, mark the end of the code block. --- The above represents a compromise suggestion. I feel the semantics of comments ought to be the same as those in, e.g., C, Perl; i.e., comment text should be naively stripped from the input stream seen by the parser. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 29 18:00:01 2025 UTC |
The behavior is needed to allow using single line comments while embedding PHP in HTML like in <h1><?php echio $title; // comment ?></h1> Your compromise won't work as it break valid code like <?php if ($cond) { ?><h1>TRUE</h1><?php } ?>