#42727 [Opn]: Zend doesn't fail with syntax error

From: Date: Tue, 02 Oct 2007 11:47:54 +0000
Subject: #42727 [Opn]: Zend doesn't fail with syntax error
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-118081@lists.php.net to get a copy of this message
ID: 42727 Updated by: tony2001@php.net Reported By: php at hristov dot com Status: Open -Bug Type: Scripting Engine problem +Bug Type: Feature/Change Request Operating System: Linux PHP Version: 6CVS-2007-09-21 (CVS) New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [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 http://bugs.php.net/?id=42727&edit=1

« previous php.bugs (#118081) next »