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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 01 21:01:35 2025 UTC