ID: 44767 Comment by: whitewolf24 at hotmail dot com Reported By: ikickdogsforfun at hotmail dot com Status: Open Bug Type: Scripting Engine problem Operating System: Gentoo Linux PHP Version: 5.2.6RC5 New Comment:
um, last I checked and have read in the manual # comments to the end of the line OR the end of the php block, which ever happens first. not to another # Previous Comments: ------------------------------------------------------------------------ [2008-04-17 20:49:53] ikickdogsforfun at hotmail dot com Description: ------------ A # comment can be closed by a second # causing PHP to act rather oddly. Any errors that occur on the same line but after the closing # are reported as an error on the next line, however if there are no errors anything after the second # is ignored and not processed as if it was a comment. I think based on this, there needs to be some concistency about what happens when a second # is encountered. Are these intended to be embedded comments which can be be closed? Or should everything being ignored after the first # untill a new line character is encountered? Reproduce code: --------------- This produces 2 errors, one on line 2, one on line 3, though they are both about line 3: <? echo \"some ".# This is an imbedded comment#"text"; ?> This only echos out 'some': <? echo "some ".# This is an imbedded comment#"hi"; ?> Expected result: ---------------- I would expect to see 'some text' echoed out, as I was under the impression these kinds of comments were imbedded. Actual result: -------------- See the code section ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=44767&edit=1