News Feed
Jobs Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Christian Stocker's Blog:
PHP is (most presumably) getting namespaces
November 29, 2005 @ 05:28:49

According to this new post from Christian Stocker today, PHP is "(most presumably) getting namespaces".

If you're not subscribed on the internals mailinglist of PHP, you may have missed a (most of the time very ridiculous) discussion about namespaces in PHP. The important part of the whole discussion is, that it looks like PHP 6 is getting namespaces. I don't care that much about namespaces, I prefix my classes anyway, but it's a nice to have certainly.

The annoying part of the discussion (with dozens of redundant posts) was about which namespace separator should be used. [...] Anyway, at the end it boils down to either :: or ::: or as separator, the double colons have some technical limitations, the backslash looks somehow strange.

For those that aren't sure what "namespaces" refers to, think about this example: two PHP files both have the function read() in their classes. If you wanted to use things from both clases at the same time, it'd be impossible - one read() would override the other. Namespaces would allow you to separate them out, referring to them as seperate, distinct items in their own classes...

2 comments voice your opinion now!
namespaces operator namespaces operator


blog comments powered by Disqus

Similar Posts

Christian Stocker\'s Blog: PHP is (most presumably) getting namespaces

WebReference.com: Unary, Binary, and Ternary Operators in PHP

Community News: XPath Explained (by Tobias Schlitt and Jacob Westhoff)

Eran Gelperin's Blog: Operator overloading in PHP

Vidyut Luther\'s Blog: PHP Namespaces - Working with external teams and possibly frameworks


Community Events











Don't see your event here?
Let us know!


composer code language release unittest install security series introduction facebook symfony2 component example application hhvm framework package hack podcast opinion

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework