Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:59799 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80790 invoked from network); 12 Apr 2012 17:37:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Apr 2012 17:37:45 -0000 X-Host-Fingerprint: 208.107.13.98 host-98-13-107-208.midco.net Date: Thu, 12 Apr 2012 13:37:44 -0400 Received: from [208.107.13.98] ([208.107.13.98:14763] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D4/A2-00290-7E2178F4 for ; Thu, 12 Apr 2012 13:37:44 -0400 Message-ID: To: internals@lists.php.net References: User-Agent: slrn/pre1.0.0-18 (Linux) X-Posted-By: 208.107.13.98 Subject: Re: [RFC] Allow "use( $longname as $alias)" syntax for closures declaration From: weierophinney@php.net (Matthew Weier O'Phinney) On 2012-04-12, Laruence wrote: > I have made a RFC to allow user use T_AS in the closure declaration, like: > > function () use($long as $l, &$long as $r) { > } > > here is the RFC: https://wiki.php.net/rfc/useas > > any ideas? thanks I really like this, as it brings a symmetry to how "use" is used when importing classes/namespaces; I've often attempted to use "as" within my closure use statements, only to get burned. -- Matthew Weier O'Phinney Project Lead | matthew@zend.com Zend Framework | http://framework.zend.com/ PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc