PHP 5 >= 5.3.0, PHP 7, PHP 8
get_called_class - The "Late Static Binding" class name
Code Examples

get_called_class( ): string

Gets the name of the class the static method is called in.


This function has no parameters.

Return Values

Returns the class name. Returns false if called from outside a class.

Related Functions

Example of get_called_class

Show all examples for get_called_class

PHP Version:

Function get_called_class:

Class/Object Information Functions

Most used PHP functions