I have the following hiearchy:
class A {
public static function getClass() {
return __CLASS__;
}
}
class B extends A {}
class C extends B {}
without overriding getClass() in either B or C, I would like the following output:
echo A::getClass() // A
echo B::getClass() // B
echo C::getClass() // C
Currently, all of the above simply output A. How can I achieve the desired behavior?
__CLASS__did you tryget_class($this)?