From: ikickdogsforfun at hotmail dot com Operating system: Gentoo Linux PHP version: 5.2.6RC5 PHP Bug Type: *General Issues Bug description: Incorrect handling of a closing # to # based comments
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 bug report at http://bugs.php.net/?id=44767&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44767&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44767&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44767&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44767&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44767&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44767&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=44767&r=needscript Try newer version: http://bugs.php.net/fix.php?id=44767&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44767&r=support Expected behavior: http://bugs.php.net/fix.php?id=44767&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44767&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44767&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44767&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44767&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=44767&r=dst IIS Stability: http://bugs.php.net/fix.php?id=44767&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44767&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44767&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44767&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=44767&r=mysqlcfg