Skip to main content

Namespaces

Declaring namespaces

Namespaces need to be declared at the top of the source file.

namespace Foo;

Importing namespaces

Namespace imports need to be declared at the top of the source file, after the namespace declaration (if any).

use Foo;