get_called_class

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

get_called_class( ): string

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

Parameters

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