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