• « OOP Changelog
  • Namespaces overview »
  • PHP 4 Manual
  • Language Reference
  • Namespaces
Edit Report a Bug GitHub logo

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
  • Other versions of this page
    • PHP 4
    • PHP 5
    • PHP 7 (php.net)
    • PHP 8 (php.net)
Legacy manuals maintained by Home
  • Get help migrating a legacy app
  • Extend PHP support for EOL versions