Bug #52438 [Opn->Bgs]: Parser error on a simple example

From: Date: Mon, 26 Jul 2010 00:27:22 +0000
Subject: Bug #52438 [Opn->Bgs]: Parser error on a simple example
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-152777@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 Updated by: scottmac@php.net Reported by: dagdamor10 at mail dot ru Summary: Parser error on a simple example -Status: Open +Status: Bogus Type: Bug Package: Scripting Engine problem Operating System: Windows PHP Version: 5.2.14 Block user comment: N New Comment: It's always been <?php\w that has been required for lexer. Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#152777) next »