Query: get_called_class
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
GET_CALLED_CLASS(3) 1 GET_CALLED_CLASS(3) get_called_class - the "Late Static Binding" class nameSYNOPSISstring get_called_class (void )DESCRIPTIONGets the name of the class the static method is called in.RETURN VALUESReturns the class name. Returns FALSE if called from outside a class.EXAMPLESExample #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 ALSOget_parent_class(3), get_class(3), is_subclass_of(3). PHP Documentation Group GET_CALLED_CLASS(3)
| Related Man Pages |
|---|
| get_class(3) - php |
| runkit_method_rename(3) - php |
| class_uses(3) - php |
| classkit_import(3) - php |
| classkit_method_rename(3) - php |
| Similar Topics in the Unix Linux Community |
|---|
| User Guide: Posting in the Emergency Forum |
| Forum Video Tutorial: How to Use Code Tags |
| Coming Soon: Upgrade Forum Software (Dec 31 - Jan 1) |
| Please Welcome Nicki Paul to the Moderator Team! |