We have a code
class ParentClass {
public static function getName() {
return get_class(self);
}
}
class ChildClass extends ParentClass {
}
echo ParentClass::getName(); # => 'ParentClass'
echo ChildClass::getName(); # => 'ParentClass'
if I use get_class($this) there is the same result. Also for self::$this, static::$this etc
Any way to get child class name without adding methods to child class for this?