Namespaces in PHP
One of the most requested features for PHP are namespaces, and they're finally coming. And we don't have to wait untill PHP6, because PHP 5.3 will have them already! And in this post we're going to take a look how namespaces in PHP look like.
Why namespaces are so important
When PHP5 was released, OOP became a lot more important in PHP applications. And with OOP comes classes. Sometimes, you want to use an existing framework, with an other lib. But when the framework and the lib have a class with the same name, you'll get an error.
A solution for this is to prefix your classnames, but in some cases, your classnames will get very long, and because we, programmers, are lazy, we don't want that.
And here's were namespaces come in, you can group classes under a name, and classes can have the same name, when both are in an other namespace.
So, you want to know how to use namespaces in PHP? Click the read more link.
First, we're going to define a namespace. This is done with the namespace keyword.

