Tag Archives: Unqualified namespaces
How to use PHP namespaces
PHP namespaces Before we dig in into namespaces, we have to understand what they are, and how they are used. A simple analogy can be made between PHP namespaces and a filesystem. They work quite the same and apply the same principle. Imagine the following directory structure:
1 2 3 4 5 6 7 8 9 |
/myLocalSpace /home foo.txt /work bar.txt |
Everything clear. You have a “foo.txt” file in the