8086129c9c
PHP namespaces don't work anything like a block, so the implementation is specific and not combined with scope management. Namespaces cannot be nested, and they may apply either to the rest of the file (until the next namespace declaration, if any) or to a specific block. Namespaces applying to the rest of the file: namespace Foo; /* code in namespace Foo */ namespace Bar\Baz; /* code in namespace Bar\Baz */ Namespaces applying to blocks: namespace Foo { /* code in namespace Foo */ } namespace Bar\Baz { /* code in namespace Bar\Baz */ } namespace { /* code in root namespace */ }