|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #289 PHP does not evaluate the () (Function call) operator correctly
Submitted: 1998-04-20 12:06 UTC Modified: 1998-04-24 10:23 UTC
From: kk at shonline dot de Assigned:
Status: Closed Package: Performance problem
PHP Version: 3.0 Release Candidate 4 OS: Solaris 2.5.1
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: kk at shonline dot de
New email:
PHP Version: OS:


 [1998-04-20 12:06 UTC] kk at shonline dot de
Function calls with a variable name work as exspected when
called by a simple expression:

function name_lang() {
        printf("I am a function\n");
$x = "name";
$y = "_lang";
$z = $x.$y;
Content-type: text/html
I am a function

But PHP fails to parse the () function call operator in the
following environment:

<b>Parse error</b>:  parse error in <b>-</b> on line <b>11</b><br>


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [1998-04-24 10:23 UTC] zeev
This syntax is not supported.  Only strings
and variables can be used as function names (not any
other expressions)

You can use
$foo = $x.$y;

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Jun 16 16:01:23 2021 UTC