1--TEST-- 2ReflectionClass::getNamespaceName() 3--FILE-- 4<?php 5namespace A\B; 6class Foo { 7} 8 9$function = new \ReflectionClass('stdClass'); 10var_dump($function->inNamespace()); 11var_dump($function->getName()); 12var_dump($function->getNamespaceName()); 13var_dump($function->getShortName()); 14 15$function = new \ReflectionClass('A\\B\\Foo'); 16var_dump($function->inNamespace()); 17var_dump($function->getName()); 18var_dump($function->getNamespaceName()); 19var_dump($function->getShortName()); 20?> 21--EXPECT-- 22bool(false) 23string(8) "stdClass" 24string(0) "" 25string(8) "stdClass" 26bool(true) 27string(7) "A\B\Foo" 28string(3) "A\B" 29string(3) "Foo" 30