php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20600 Parsing Bug
Submitted: 2002-11-23 13:50 UTC Modified: 2002-11-25 05:49 UTC
From: artistoex at yahoo dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.2.3 OS: Win32
Private report: No CVE-ID: None
 [2002-11-23 13:50 UTC] artistoex at yahoo dot com
<?
if (true){
    echo ("");//Here should be reported the syntax error('expecting }' or something like that)
bug();

PHP reports unexpected $

--
Win32 Apache 1.3.27/PHP 4.2.3/SAPI

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-23 13:52 UTC] derick@php.net
Works fine:

[derick@kossu derick]$ php
<?
if (true){
    echo ("");//Here should be repoorted the syntax error('expecting }' or
bug();
?>

Parse error: parse error in - on line 6
-(6) : Parse error - parse error
[derick@kossu derick]$ php -v
PHP 4.3.0-dev (cli) (built: Nov 21 2002 14:11:40)
Copyright (c) 1997-2002 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2002 Zend Technologies


And BTW: just fix the code; if PHP can not parse it the parser goes into an unstable state. Not really a bug.

Derick
 [2002-11-23 13:55 UTC] artistoex at yahoo dot com
Another interesting thing:
----example 1----
<?if (true){
    echo("");
-----------------
-Parser says-
Parse error: parse error, unexpected $ in [file] on line 2

----example 1----
<?if (true){
    echo();
-----------------
-Parser says-
Parse error: parse error, unexpected ')' in [file] on line 2

what's that?????
 [2002-11-25 05:49 UTC] artistoex at yahoo dot com
>[derick@kossu derick]$ php -v
>PHP 4.3.0-dev (cli) (built: Nov 21 2002 14:11:40)
>Copyright (c) 1997-2002 The PHP Group
>Zend Engine v1.3.0, Copyright (c) 1998-2002 Zend >Technologies
>
>
>And BTW: just fix the code; if PHP can not parse it the >parser goes
>into an unstable state. Not really a bug.
>
>Derick



When the parser says that there would be a char, which is obviously not present in the entire script i call it a bug. And "just fix the code" is easier said than done: When the parser says that there would be an unexpected char in the last line - which is an empty one (and the 190th) - "just" means a work of hours for nothing - for a bug which is "Not really a bug".
Please fix that bug.

werner
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Sep 18 23:01:26 2024 UTC