I was about to make the same point as Johannes. Trying all possible variants in the autoloader is simply too slow (and in fact the main reason why we don't have function autoloading). On the flip-side, the current proposal would allow adding function autoloading more easily in the future.
Another note: To address the issue in a different way, some sort of syntax for importing multiple names would be nice. Something like: from foo use bar, baz; But that is way out of scope, and should be done as a separate proposal. Regards, Igor On Aug 15, 2013, at 3:24 PM, Johannes Schlüter <johan...@schlueters.de> wrote: > On Thu, 2013-08-15 at 14:11 +0100, Marcello Duarte wrote: >> Hi, >> >> Are there any thoughts regarding importing multiple functions of a >> namespace with a wildcard? >> >> A use case being, for example, assertions from a testing framework. >> >> use (or use function) TestingFramework\Assertions\<chosen wildcard >> here>; // in java * is used for wildcard > > Unlike Java and others we can't easily know all available choices. > > Consider > > use (or use function) Foo\*; > use (or use function) Bar\*; > foo(); > > Will this be a global foo, Foo\foo or Bar\bar? This becomes more funny > with the fact that PHP allows includes at runtime > > use (or use function) Foo\*; > use (or use function) Bar\*; > foo(); // only \foo() exists > include 'Foo\foo.php'; > foo(); // Foo\foo() now exists, too > > johannes > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php