|
get_called_classThe "Late Static Binding" class name Description
string get_called_class()
Gets the name of the class the static method is called in. ParametersThis function has no parameters. Return ValuesReturns the class name. Errors/Exceptions
If get_called_class is called from outside a class,
an Error is thrown. Prior to PHP 8.0.0,
an Changelog
Examples
Example #1 Using get_called_class
The above example will output: string(3) "foo" string(3) "bar" See Also
|