Term
Namespace
Meaning
A namespace is a way to group classes, interfaces, functions and constants under a prefix so that names do not clash. The PHP manual gives two purposes: avoiding collisions between your code and PHP's own or third-party names, and allowing long names to be aliased or shortened. Namespaces work like folders for files and become important as soon as a project uses packages from several authors through Composer. A class named Mailer can then exist in many packages without conflict. See also: Composer, Class, and the guide PHP Functions and Object Oriented Programming Concepts.