Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68284 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51637 invoked from network); 23 Jul 2013 10:44:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jul 2013 10:44:28 -0000 Authentication-Results: pb1.pair.com smtp.mail=igor@wiedler.ch; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=igor@wiedler.ch; sender-id=unknown Received-SPF: error (pb1.pair.com: domain wiedler.ch from 217.26.49.185 cause and error) X-PHP-List-Original-Sender: igor@wiedler.ch X-Host-Fingerprint: 217.26.49.185 mxout006.mail.hostpoint.ch Received: from [217.26.49.185] ([217.26.49.185:49530] helo=mxout006.mail.hostpoint.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E6/39-17597-A8E5EE15 for ; Tue, 23 Jul 2013 06:44:27 -0400 Received: from [10.0.2.46] (helo=asmtp013.mail.hostpoint.ch) by mxout006.mail.hostpoint.ch with esmtp (Exim 4.72 (FreeBSD)) (envelope-from ) id 1V1a4u-000Cuv-7C; Tue, 23 Jul 2013 12:44:24 +0200 Received: from [84.73.218.139] (helo=[10.0.1.97]) by asmtp013.mail.hostpoint.ch with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1V1a4u-000H7l-21; Tue, 23 Jul 2013 12:44:24 +0200 X-Authenticated-Sender-Id: igor@wiedler.ch Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) In-Reply-To: Date: Tue, 23 Jul 2013 12:44:24 +0200 Cc: Alexey Zakhlestin , "internals@lists.php.net" Content-Transfer-Encoding: quoted-printable Message-ID: References: <60BF8DD5-FEEA-47D9-834F-6C7FDEF3B879@wiedler.ch> To: Martin Keckeis X-Mailer: Apple Mail (2.1508) Subject: Re: [PHP-DEV] [RFC] Importing namespaced functions From: igor@wiedler.ch (Igor Wiedler) Hi Martin, Aliasing is possible, there is an example of it in the test cases of the = patch [0]. As for your example, it's valid. Regards, Igor [0]: = https://github.com/igorw/php-src/blob/use-function/Zend/tests/use_function= /alias.phpt On Jul 23, 2013, at 10:10 AM, Martin Keckeis = wrote: > Hello, >=20 > some questions: > Alias is not required, but is it possible? >=20 > Would it be possible to write something like this? > namespace MySpace; >=20 > use OtherLib\HtmlResponse; > use function html\div, html\p, html\em; >=20 > class MyClass{ >=20 > public function getResponse(){ > return new HtmlResponse( div(p('Some', em('Text'))) ); > } > } > ?> >=20 > Best regards > Martin