Edit report at https://bugs.php.net/bug.php?id=42727&edit=1
ID: 42727 Updated by: [email protected] Reported by: php at hristov dot com Summary: Zend doesn't fail with syntax error -Status: Open +Status: Closed Type: Feature/Change Request Package: Scripting Engine problem Operating System: * PHP Version: * -Assigned To: +Assigned To: nikic Block user comment: N Private report: N New Comment: Closing as this was already fixed. The sample code now throws Parse error: syntax error, unexpected '' ' (T_ENCAPSED_AND_WHITESPACE) in /code/2qWahH on line 2 See http://codepad.viper-7.com/2qWahH. Previous Comments: ------------------------------------------------------------------------ [2007-10-02 11:47:54] [email protected] Doesn't look like a bug to me. The lexer encounters unexpected character, reports about it (E_COMPILE_WARNING) and throws it away, continuing execution. Surely it's possible to change this E_COMPILE_WARNING to E_COMPILE_ERROR, but I see no reasons to do it atm. ------------------------------------------------------------------------ [2007-09-21 12:35:26] php at hristov dot com Description: ------------ See the example and the result. There is a stray quote. There is a warning, but it should be a parse error, shouldn't it? Reproduce code: --------------- <?php ' echo "Should we see this?\n"; ?> Expected result: ---------------- Syntax error on line 2 Actual result: -------------- andrey@whirlpool:~/dev/php6> ./php b.php PHP Warning: Unexpected character in input: ''' (ASCII=39) state=1 in /home/andrey/dev/php6/b.php on line 2 Should we see this? ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=42727&edit=1
