在PHP中知道类的命名空间的最简单方法是什么? [重复]

This question already has an answer here:

Im wondering what is the easiest way to know the namespace of a class in PHP. For example I want to know the namespace of RecursiveArrayIterator.

</div>
$rc = new \ReflectionClass('CLASSPATH OR INSTANCE');
var_dump($rc->getNamespaceName());

Note: Empty string means global namespace