Bug #52438 [Com]: Parser error on a simple example
| From: | dagdamor10 at mail dot ru | Date: | Mon, 26 Jul 2010 08:21:04 +0000 |
| Subject: | Bug #52438 [Com]: Parser error on a simple example | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-152782@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=52438&edit=1
ID: 52438
Comment by: dagdamor10 at mail dot ru
Reported by: dagdamor10 at mail dot ru
Summary: Parser error on a simple example
Status: Bogus
Type: Bug
Package: Scripting Engine problem
Operating System: Windows
PHP Version: 5.2.14
Block user comment: N
New Comment:
Since "}" is not a letter (and never was), the test above is perfectly
valid.
Previous Comments:
------------------------------------------------------------------------
[2010-07-26 02:27:22] scottmac@php.net
It's always been <?php\w that has been required for lexer.
------------------------------------------------------------------------
[2010-07-25 16:02:05] dagdamor10 at mail dot ru
Description:
------------
My framework (http://www.phpc.ru) uses automatic code generation, and
when I was fine-tuning it, I discovered a weird error in the PHP parser.
Test script:
---------------
<?php
function test() {?>This is a test.<?php}
?>
Expected result:
----------------
Empty screen (since the function is never called)
Actual result:
--------------
Parse error: syntax error, unexpected $end in index.php on line 6
If you add a space character between "<?php" and "}", it works just
fine.
I simply used a workaround, but maybe this report will be useful for
you.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=52438&edit=1