PHP Manual
Language Reference
Basic syntax
Types
Variables
Constants
Expressions
Operators
Control Structures
Functions
Classes and Objects
Namespaces
Enumerations
Errors
Exceptions
Fibers
Generators
Attributes
References Explained
Predefined Variables
Predefined Exceptions
Predefined Interfaces and Classes
Predefined Attributes
Context options and parameters
Supported Protocols and Wrappers
OOP Changelog
Overview
Language Reference
PHP Manual
Namespaces
Table of Contents
Overview
— Namespaces overview
Namespaces
— Defining namespaces
Sub-namespaces
— Declaring sub-namespaces
Defining multiple namespaces in the same file
— Defining multiple namespaces in the same file
Basics
— Using namespaces: Basics
Namespaces and dynamic language features
— Namespaces and dynamic language features
namespace keyword and __NAMESPACE__
— The namespace keyword and __NAMESPACE__ magic constant
Aliasing and Importing
— Using namespaces: Aliasing/Importing
Global space
— Global space
Fallback to global space
— Using namespaces: fallback to the global space for functions and constants
Name resolution rules
— Name resolution rules
FAQ
— FAQ: things you need to know about namespaces