|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37684 read class name of a inherited class with a inherited static method possible?
Submitted: 2006-06-02 20:24 UTC Modified: 2006-06-02 20:36 UTC
Avg. Score:4.7 ± 0.7
Reproduced:5 of 6 (83.3%)
Same Version:3 (60.0%)
Same OS:2 (40.0%)
From: info at marcgrabow dot de Assigned:
Status: Wont fix Package: Class/Object related
PHP Version: 5CVS-2006-06-02 (snap) OS: Win 2000
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: info at marcgrabow dot de
New email:
PHP Version: OS:


 [2006-06-02 20:24 UTC] info at marcgrabow dot de
I want to extract the class name of a inherited class with a inherited static method.

I've tried that in a lot of ways, but I didn't get it.

Is it possible at all?

Reproduce code:
class TestParent {
  static function getClass() {
    return get_class();

class TestChild extends TestParent {

echo TestChild::getClass();

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-06-02 20:36 UTC]
You have to wait until we implement late static binding.
But personally I think your code works exactly the way it should work.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Sep 28 01:03:37 2021 UTC