// create an object
$bar = new foo();
// external call
echo "Its name is " , get_class($bar) , "
";
get_class($object);
<?php
namespace FooBar;
class Baz {
public function __construct()
{
}
}
$baz = new FooBarBaz;
// get class of namespaced classes
var_dump(get_class($baz)); // result: string(11) "FooBarBaz"
?>