Arquivos
hhvm/hphp/test/quick/ns_reflection.php
T
Paul Tarjan a7c6ad1817 add namespace reflection methods
added in 5.3

I couldn't actually get the ##sysdoc.php## to work (it just deleted all the docblocks), so I just copied the format.
2013-05-20 13:52:28 -07:00

20 linhas
428 B
PHP

<?php
namespace A\B;
class Foo { }
$function = new \ReflectionClass('stdClass');
var_dump($function->inNamespace());
var_dump($function->getName());
var_dump($function->getNamespaceName());
var_dump($function->getShortName());
$function = new \ReflectionClass('A\\B\\Foo');
var_dump($function->inNamespace());
var_dump($function->getName());
var_dump($function->getNamespaceName());
var_dump($function->getShortName());
?>