News for hackers. Stuff that matters.
Re:A Built-in Web Server For PHP by roel_v on Thursday March 03, 2011 @07:28AM (#2283725)
You can't import everything from a whole namespace, but you can do it on a per-class basis. The following works as expected:

    namespace My {
        class MyClass { public function Foo() { echo 'Foo'; } }
    }

    namespace {
        use My\MyClass;
        $var = new MyClass();
        $var->Foo();
    }

There are no comments on this comment yet.