PHP how to import all classes from another namespace January 30, 2023 by Tarik This is not possible in PHP. All you can do is: namespace Foo; use Bar; $obj = new Bar\SomeClassFromBar();