|  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:5.0 ± 0.0
Reproduced:5 of 5 (100.0%)
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
Have you experienced this issue?
Rate the importance of this bug to you:

 [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-2018 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC