On NetTuts.com today there's a new tutorial introducing you to namespaces in PHP and a complete guide to the features that come with them.
It's been a bumpy ride, in regards to namespace support in PHP. Thankfully, it was added to the language in PHP 5.3, and the applicable structure of PHP code has improved greatly since then. But how exactly do we use them?
They start with a definition of a namespace (for those unfamiliar with the term) and get right into the code showing their use in PHP:
- Defining a Namespace (and Sub-namespaces)
- Calling Code from a Namespace (using Unqualified/Qualified/Fully Qualified names)
- Dynamic calls
- The namespace Keyword
- Aliasing or Importing