I'm probably the only one that hadn't noticed that namespaces have been introduced in php as of 5.3.0. For those that are not in the know i've written a very brief post here
If you just noticed that, you may also have missed that the namespace separator has changed from :: to \. So accessing a static class method through a namespace now looks like this
Code:
namespace\subnamespace\class::method()
And as an added bonus, not only is this syntax painfully ugly and inconsistent with the syntax of every other similar language, but now you have to remember to watch your quoting/escaping if you want to pass a namespaced class in a string.
So in one shot the PHP developers have managed to add a useful new feature and screw up the language even more than it already was. Sigh.... Time to go brush up on my Python....
really? when i checked the php manual earlier today they were on the double colon. Greg is really good at taking user feedback and he's in charge of this section of the trunk. If you've got a gripe (and i'd agree with you) then let him hear it!
Yeah, apparently they haven't updated the documentation yet. The decision was made last weekend and hit Slashdot on Sunday. From what I've read so far, a lot of people seem...disappointed...by this choice.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.