- var_dump: documentation ( source)
- get_class: documentation ( source)
<?php
// Foo/Exception.php:
namespace Foo {
class Exception extends \Exception {}
}
// Foo/Bar.php:
namespace Foo {
//use Exception;
class Bar {
public static function baz() {
return get_class(new Exception('Should be base Exception'));
}
}
}
namespace {
var_dump(Foo\Bar::baz());
}