Is it possible to get the name of the top level class from an extended class, without setting it from the top level class. See example below, I would like to get \'Foo\' fro
get_called_class() for static classes or get_class($this) for instantiated.
get_called_class(), as Jason said, was introduced in PHP 5.3
get_called_class()
Use:
get_class($this);
You can simply use: