From: Operating system: Windows PHP version: 5.2.14 Package: Scripting Engine problem Bug Type: Bug Bug description:Parser error on a simple example
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 bug report at http://bugs.php.net/bug.php?id=52438&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52438&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52438&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52438&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=52438&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52438&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=52438&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=52438&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=52438&r=needscript Try newer version: http://bugs.php.net/fix.php?id=52438&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=52438&r=support Expected behavior: http://bugs.php.net/fix.php?id=52438&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=52438&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=52438&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=52438&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52438&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=52438&r=dst IIS Stability: http://bugs.php.net/fix.php?id=52438&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=52438&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=52438&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=52438&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=52438&r=mysqlcfg