|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #42727 Zend doesn't fail with syntax error
Submitted: 2007-09-21 12:35 UTC Modified: 2012-06-05 23:07 UTC
Avg. Score:4.0 ± 1.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: php at hristov dot com Assigned: nikic (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: * OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: php at hristov dot com
New email:
PHP Version: OS:


 [2007-09-21 12:35 UTC] php at hristov dot com
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:
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?


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-02 11:47 UTC]
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.
 [2011-04-08 21:13 UTC]
-Package: Feature/Change Request +Package: Scripting Engine problem -Operating System: Linux +Operating System: * -PHP Version: 6CVS-2007-09-21 (CVS) +PHP Version: *
 [2012-06-05 23:07 UTC]
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

 [2012-06-05 23:07 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: nikic
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Mar 05 11:01:23 2021 UTC