PHP how to import all classes from another namespace

This is not possible in PHP.

All you can do is:

namespace Foo;

use Bar;

$obj = new Bar\SomeClassFromBar();

Leave a Comment