Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68528 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 15316 invoked from network); 15 Aug 2013 13:24:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Aug 2013 13:24:36 -0000 Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.211.66 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.211.66 config.schlueters.de Received: from [217.114.211.66] ([217.114.211.66:50310] helo=config.schlueters.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A6/E1-06453-396DC025 for ; Thu, 15 Aug 2013 09:24:36 -0400 Received: from [192.168.2.20] (ppp-88-217-94-43.dynamic.mnet-online.de [88.217.94.43]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by config.schlueters.de (Postfix) with ESMTPSA id 6BC526C984; Thu, 15 Aug 2013 15:24:32 +0200 (CEST) To: Marcello Duarte Cc: Igor Wiedler , Daniel Bingham , Michael Wallner , "internals@lists.php.net" In-Reply-To: References: <60BF8DD5-FEEA-47D9-834F-6C7FDEF3B879@wiedler.ch> <6644FE5E-4CBA-4A08-8766-8634CAA4426D@wiedler.ch> Content-Type: text/plain; charset="UTF-8" Date: Thu, 15 Aug 2013 15:24:13 +0200 Message-ID: <1376573053.14536.219.camel@guybrush> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Importing namespaced functions From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) 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\ 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