PHP got forked
October 31st, 2008 | by Stefan Esser |During International PHP Conference 2008 there where a lot of discussions about the stupid backslash namespace seperator decision. Most of the guys “do not want to have their PHP files look like windows registry dumps” (Quoting some unknown guy at the panel discussion). Some people even suggested forking PHP at PHP 5.3 to replace the backslash with the more accepted tripple colon (:::).
Being a man of actions the first thing I did today was to fork PHP.
Proof is here.






39 Responses to “PHP got forked”
By Eric Bartels on Oct 31, 2008 | Reply
I was unaware that forking PHP is that easy …
By Danne on Oct 31, 2008 | Reply
Poor Pellephant.
Seriously - the fact that windows use backslash and some people for some reason hate windows should not be relevant. To me it looks like this is the sole reason some people are complaining.
By Hannes Magnusson on Oct 31, 2008 | Reply
*thihihi*
For a second there I really thought you did
By Mike on Oct 31, 2008 | Reply
Where can I get one of those elephants?
By Anonymous Coward on Oct 31, 2008 | Reply
I don’t get it.
By Tom on Oct 31, 2008 | Reply
Poor thing, where do I get one?
By Stefan Koopmanschap on Oct 31, 2008 | Reply
ah you bastard, you actually did it!
poor elephpant
By Bill Stegers on Oct 31, 2008 | Reply
Just stick a fork in it when it’s done!
By Damien on Oct 31, 2008 | Reply
Seeing all this (not only the backslashes. But also the goto functionnality etc), I decided to put PHP out many months ago.
Ruby rox !
By Christer on Oct 31, 2008 | Reply
The ElePHPant is still smiling! Poke it harder!
By mark on Oct 31, 2008 | Reply
Your fork looks a bit static.
By GranMujer on Oct 31, 2008 | Reply
Yeah, ‘cuz Very:::Long:::Namespace:::or:::Class::Name:::with:::some:::method() is oh so much, much better than Very\Long\\Namespace\or\Class\Name\with\some\method() right?
By Stefan Priebsch on Oct 31, 2008 | Reply
I’d actually prefer the namespace separator to be php.ini-configurable.
By Jonovic on Oct 31, 2008 | Reply
Best is the best information I’ve read for last two weeks about namespaces problem - congrat!
By my\name\is\software\guru on Oct 31, 2008 | Reply
i\am\a\guru\dudes!
By Carlos on Oct 31, 2008 | Reply
Have language things configurable on php.ini would be terrible. It would be like “less pattern to a pattern-less language.” wow!
By Benjamin on Oct 31, 2008 | Reply
Was this a change from earlier versions of the namespace implementation? Seems the “might be outdated” docs point to a double colon usage:
http://us.php.net/manual/en/language.namespaces.rules.php
At any rate, I’m just glad we’re finally getting namespaces…
By Mo on Oct 31, 2008 | Reply
:: would have worked fine, it just required a defined (read: predictable) order of scope resolution. C++ manages just fine.
By You're All Dumb. on Oct 31, 2008 | Reply
The idiocy of the decision has nothing to do with making php look like Windows. The idiocy is that they’re adding another keyword to a language that is already bloated with every construct in the book. Using “:::” wouldn’t be a solution, it would be just as stupid as “\” for that very reason. There’s really no reason why :: can’t be used, and since it’s already in the language, it would not be arbitrary and idiotic, but rather intuitive and seamless.
By Thomas on Oct 31, 2008 | Reply
The problem with :: seems to be the ambiguity
from Foo::Bar::baz()
- baz can be a static method in the class Bar
- baz can be a function in namespace Bar
But solving this by using \ as separator is very ugly for me.
Other languages even don’t have different separators (Java, c#).
But if we must have differen separators, i vote for .. so we have:
My..Namespace..Foo..Bar::baz()
I think it’s very readable.
By Corni on Oct 31, 2008 | Reply
php just get’s uglier+uglier every second…
It needs a major cleanup of the language + a redesign, else it willjust get more features and more features and the language itself gets cluttered and cluttered any nobody notices. It just hasn’t got the elegance of C, or even (sometimes) C++…
By Max Horváth on Nov 1, 2008 | Reply
Love ya for that
By foo bar on Nov 1, 2008 | Reply
to me, only one thing is obvious: while trying to sanitize input, quoting will more often be messed up. (not that it isnt one of the biggest problem in deployed php sites already)
By Isotopp on Nov 1, 2008 | Reply
I am all for “using namespace” as a namespace operator.
using namespace Foo:Bar {
class Blah {
function baz() { … }
}
}
and
using namespace Foo:Bar {
Blah::baz();
}
or
Blah::baz() using namespace Foo:Bar;
1. Single Colon is fine
2. “using namespace” is extremely readable.
3. Scope it or use it as a Suffix, as needed.
and
4. Not another fucking special character!
By mnt on Nov 3, 2008 | Reply
What about enforcing a space around \ ?
Foo \ Bar \ Baz::Bla
By Peter Petermann on Nov 3, 2008 | Reply
‘\’ is an escaping character in php, that alone should be reason enough to not use it as namespace seperator.
By Bernhard on Nov 4, 2008 | Reply
I suggest the bullet • instead of the backslash \
It will give PHP the final shot and no backlash
By bob on Nov 4, 2008 | Reply
It should be a combination.
Foo*?:\:?*bar
By swombat on Nov 4, 2008 | Reply
I really like the custom operators idea. Maybe all the operators can be redefined according to one’s taste.
For instance, it’d be great to be able to change them to smileys to make the code more lively, e.g.:
a
1
2 :-/ 3
instead of
a = 1 + 2 / 3
FTW!!
By Dan on Nov 4, 2008 | Reply
@bob
Oh please no. PHP’s not trying to become another Perl.
By n00b on Nov 13, 2008 | Reply
way to go. if you hate windows let’s use pipe | like in linux, that will make things much prettier.
By DamienR on Mar 1, 2009 | Reply
Nah, that’s too easy. The namespaces and even operators should be randomly generated everytime.
That’ll keep everyone on their toes
Foo*(&’^$Bar();
yeh, I could get used to that.
By Lewis on Mar 3, 2009 | Reply
“I’d actually prefer the namespace separator to be php.ini-configurable.” - Ah yes, because that would be wonderful for portability. Everyone using their own syntax is all we need.
‘:::’ is eligible and ugly. It’s also asking for typo errors.
‘.’ won’t work because that’s used for concatenation.
‘\’ is the lesser of all the evils. Just accept it or don’t use namespaces.
By Lewis on Mar 3, 2009 | Reply
Oh and pipe ‘|’ is used for bit operations, so that won’t work either.