php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24378 Calling static methods without knowing the name of the class
Submitted: 2003-06-28 17:09 UTC Modified: 2003-06-28 17:51 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: ville dot tapio at fountainpark dot com Assigned:
Status: Not a bug Package: Class/Object related
PHP Version: 4.3.1 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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ville dot tapio at fountainpark dot com
New email:
PHP Version: OS:

 

 [2003-06-28 17:09 UTC] ville dot tapio at fountainpark dot com
Description:
------------
Class Foo {
    function bar() {}
}

$class = 'Foo';
$class::bar();




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-28 17:37 UTC] ville dot tapio at fountainpark dot com
Ugly workaround:

Class Foo {
    function bar() {}
}

$class = 'Foo';
eval ($class . '::bar();');
 [2003-06-28 17:39 UTC] ville dot tapio at fountainpark dot com
Category fixed.
 [2003-06-28 17:51 UTC] derick@php.net
Not a bug, this just isn't supported.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 16:01:28 2024 UTC