Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:59858 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30884 invoked from network); 13 Apr 2012 08:10:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Apr 2012 08:10:47 -0000 Authentication-Results: pb1.pair.com smtp.mail=verbitsky_alexandr@mail.by; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=verbitsky_alexandr@mail.by; sender-id=pass Received-SPF: pass (pb1.pair.com: domain mail.by designates 193.232.92.17 as permitted sender) X-PHP-List-Original-Sender: verbitsky_alexandr@mail.by X-Host-Fingerprint: 193.232.92.17 post.open.by Received: from [193.232.92.17] ([193.232.92.17:62957] helo=post.open.by) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B6/95-01254-68FD78F4 for ; Fri, 13 Apr 2012 04:10:47 -0400 Received: from [86.57.155.126] (account verbitsky_alexandr@mail.by HELO a-verbitsky.IV) by post.open.by (CommuniGate Pro SMTP 4.3.12) with ESMTPSA id 122152604 for internals@lists.php.net; Fri, 13 Apr 2012 11:10:43 +0300 Message-ID: <4F87DF77.7040608@mail.by> Date: Fri, 13 Apr 2012 11:10:31 +0300 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Allow "use( $longname as $alias)" syntax for closures declaration From: verbitsky_alexandr@mail.by (Verbitsky Alexander) On 04/12/2012 06:38 PM, Laruence wrote: > Hi: > 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 > Closure is a functional literal that can pull with itself all variables visible in current scope where it was created. For my opinion using keyword 'use' is not necessary and i would have removed it. If you need different name of variable maybe you need anonymous function.