SEO Web Development and Design Blog

 

PHP namespaces

 

Recently while reading some other web development blog, i have found info about PHP namespaces, for those who do not know what is a namespace here is a short explanation: Basically every language is a namespace, and it doesn’t matter whatever it is a programming language, formal language of forign language. When it comes to programming languages, some of them has got a set of namespaces and importing or including one of them allows to use a set of new classes and objects.

By default PHP (5) has got only one namespace (so programmers are saying that there is no namespaces), as far as i know PHP6 already has built in namespaces support, however PHP6 will be available on commercial hosts and even free hosts at least few months from now will have to pass. So, before we get stable version of PHP6 we can tak a look at very interesting project which implements namespaces into PHP5. Project main site with long FAQ is located here.

The main idea behind this project is fact classes names are way to long to write, so use of namespaces makes it shorter and easier, well it sounds a bit “strange” to create a new extension for PHP just to make use of classes easier, but who i am to judge :).

To be honest i really didn’t found time to go into this and read all the stuff about PHP5 namespaces, so if you are interested in it then probably you have to go to the project main site, because i won’t be writeing about it anymore. For me it is just something interesting that is worth mentioning and sharing, however i do not believe it would get so popular that it would actually be included in PHP5.x source.

Other Posts you might be interested in

Leave a Reply