PHP » GoLang |
login |
register |
about
|
get_class(PHP 4, PHP 5, PHP 7) get_class — Returns the name of the class of an object Description
string get_class
([ object
$object
] )
Gets the name of the class of the given Parameters
Return Values
Returns the name of the class of which
If
If the Errors/Exceptions
If get_class() is called with anything other than an
object, an Changelog
Examples
Example #1 Using get_class()
<?php The above example will output: Its name is foo My name is foo Example #2 Using get_class() in superclass
<?php The above example will output: string(3) "foo" string(3) "bar" Example #3 Using get_class() with namespaced classes
<?php The above example will output: string(11) "Foo\Bar\Baz" See Also
|
more
Recently updated
more
Most requested
more
Last requests
|