get_class
PHP 4, PHP 5, PHP 7, PHP 8
get_class - Returns the name of the class of an object
Example #1 Using get_class
Result: Its name is foo
My name is foo
Example #2 Using get_class in superclass
Result: string(3) "foo"
string(3) "bar"
Example #3 Using get_class with namespaced classes
Result: string(11) "Foo\Bar\Baz"