• PHP Manual
  • Language Reference
  • Basic syntax
  • Types
  • Variables
  • Constants
  • Expressions
  • Operators
  • Control Structures
  • Functions
  • Classes and Objects
  • Namespaces
  • Exceptions
  • Generators
  • References Explained
  • Predefined Variables
  • Predefined Exceptions
  • Predefined Interfaces and Classes
  • Context options and parameters
  • Supported Protocols and Wrappers
OOP Changelog
Namespaces overview
Language Reference
PHP Manual

Namespaces

Table of Contents
  • Namespaces overview
  • Defining namespaces
  • Declaring sub-namespaces
  • Defining multiple namespaces in the same file
  • Using namespaces: Basics
  • Namespaces and dynamic language features
  • namespace keyword and __NAMESPACE__ constant
  • Using namespaces: Aliasing/Importing
  • Global space
  • Using namespaces: fallback to global function/constant
  • Name resolution rules
  • FAQ: things you need to know about namespaces