PHP Namespace Separator, the back slash (\)

I really would like to know why... I think they (php developer) should send a list of reasons why the backslash would be the namespace separator. This means that the follow would be the syntax:

Class.php

 namespace Foo;
 class Class {
      function init() {
      }
 }

Bootstrap.php

 include "Class.php";
 spl_autoload_register(array("Foo\tClass", "init"));

This example will register “Foo[tab]Class::init”.

Here is a link about the criteria: PHP: rfc:namespaceseparator [PHP Wiki]... maybe some people find a answer.

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
Leave a comment

0 Comments.

Leave a Reply


[ Ctrl + Enter ]