#36513 [Asn->Csd]: comment will be outputed in last line
| From: | dmitry@php.net | Date: | Thu, 13 Apr 2006 13:52:35 +0000 |
| Subject: | #36513 [Asn->Csd]: comment will be outputed in last line | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-95752@lists.php.net to get a copy of this message | ||
ID: 36513
Updated by: dmitry@php.net
Reported By: bate@php.net
-Status: Assigned
+Status: Closed
Bug Type: Scripting Engine problem
Operating System: *
PHP Version: 5CVS-2006-02-24 (snap)
Assigned To: dmitry
New Comment:
Fixed in CVS HEAD, PHP_5_1 and PHP_4_4.
Comment '//<<EOF>>' is still lost for highlighter and tokenizer.
Previous Comments:
------------------------------------------------------------------------
[2006-04-12 11:07:21] tony2001@php.net
Just for the record: PHP4 behaves in the very same way.
------------------------------------------------------------------------
[2006-04-11 11:40:11] sniper@php.net
Does not happen with PHP 4, does happen with PHP 5 and 6..
------------------------------------------------------------------------
[2006-02-24 22:10:25] bate@php.net
I applied the patch and the bug is gone :)
------------------------------------------------------------------------
[2006-02-24 15:49:32] mv-php at binarysec dot com
Hello,
A patch can be found at
http://badcode.be/~descript/PHP/php-5.1.zend_language_scanner.l.patch
-michael
------------------------------------------------------------------------
[2006-02-24 14:19:43] bate@php.net
Description:
------------
If i have a php file with no ending ?> no newline at the end and the
last line is a comment like this //} the comment "//}" will be printed
to the output.
this happens just with
<? //}
no chars behind } and no newline
this bug occurs with php cli too.
php -r '//}'
outputs //}
Reproduce code:
---------------
<?//}
Expected result:
----------------
empty output
Actual result:
--------------
//}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36513&edit=1