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.

  1. 36 Responses to “PHP got forked”

  2. By Eric Bartels on Oct 31, 2008 | Reply

    I was unaware that forking PHP is that easy … :-)

  3. 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.

  4. By Hannes Magnusson on Oct 31, 2008 | Reply

    *thihihi*

    For a second there I really thought you did :)

  5. By Mike on Oct 31, 2008 | Reply

    Where can I get one of those elephants?

  6. By Anonymous Coward on Oct 31, 2008 | Reply

    I don’t get it.

  7. By Tom on Oct 31, 2008 | Reply

    Poor thing, where do I get one?

  8. By Stefan Koopmanschap on Oct 31, 2008 | Reply

    ah you bastard, you actually did it! ;)

    poor elephpant

  9. By Bill Stegers on Oct 31, 2008 | Reply

    Just stick a fork in it when it’s done!

  10. 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 !

  11. By Christer on Oct 31, 2008 | Reply

    The ElePHPant is still smiling! Poke it harder!

  12. By mark on Oct 31, 2008 | Reply

    Your fork looks a bit static.

  13. 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?

  14. By Stefan Priebsch on Oct 31, 2008 | Reply

    I’d actually prefer the namespace separator to be php.ini-configurable.

  15. By Jonovic on Oct 31, 2008 | Reply

    Best is the best information I’ve read for last two weeks about namespaces problem - congrat!

  16. By my\name\is\software\guru on Oct 31, 2008 | Reply

    i\am\a\guru\dudes!

  17. 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!

  18. 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…

  19. 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.

  20. 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.

  21. 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.

  22. 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++…

  23. By Max Horváth on Nov 1, 2008 | Reply

    Love ya for that ;)

  24. 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)

  25. 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!

  26. By mnt on Nov 3, 2008 | Reply

    What about enforcing a space around \ ?

    Foo \ Bar \ Baz::Bla

  27. 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.

  28. 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

    :P

  29. By bob on Nov 4, 2008 | Reply

    It should be a combination.

    Foo*?:\:?*bar

  30. 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!!

  31. By Dan on Nov 4, 2008 | Reply

    @bob

    Oh please no. PHP’s not trying to become another Perl.

    :P

  32. 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.

  1. 5 Trackback(s)

  2. Oct 31, 2008: PHP-Addicted » PHP got forked?
  3. Nov 1, 2008: TalkPress, Yet Another WordPress Echo Chamber
  4. Nov 1, 2008: Mad Computer Scientist » PHPnamespacesbackwards_compatibility
  5. Nov 3, 2008: Furculition of PHP
  6. Nov 10, 2008: PHP Namespace Issue | Kingdom of Roi

Post a Comment