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