get_called_class(3) php man page | unix.com

Man Page: get_called_class

Operating Environment: php

Section: 3

GET_CALLED_CLASS(3)							 1						       GET_CALLED_CLASS(3)

get_called_class - the ";Late Static Binding" class name

SYNOPSIS
string get_called_class (void )
DESCRIPTION
Gets the name of the class the static method is called in.
RETURN VALUES
Returns the class name. Returns FALSE if called from outside a class.
EXAMPLES
Example #1 Using get_called_class(3) <?php class foo { static public function test() { var_dump(get_called_class()); } } class bar extends foo { } foo::test(); bar::test(); ?> The above example will output: string(3) "foo" string(3) "bar"
SEE ALSO
get_parent_class(3), get_class(3), is_subclass_of(3). PHP Documentation Group GET_CALLED_CLASS(3)
Related Man Pages
property_exists(3) - php
class_parents(3) - php
classkit_import(3) - php
classkit_method_rename(3) - php
forward_static_call(3) - php
Similar Topics in the Unix Linux Community
New Code Tags (Syntax Highlighting)
Status of UNIX.COM Forum Transformation
Please Welcome Ravinder Singh to the Moderation Team
The Order of the Wizard's Hat - Lifetime Achievement Award 2019 - Congrats to Don Cragun
Denial Of Service Attack Update