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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
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

Pull Requests

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: Wed Dec 04 04:01:29 2024 UTC