Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:59859 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 32260 invoked from network); 13 Apr 2012 08:15:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Apr 2012 08:15:13 -0000 Authentication-Results: pb1.pair.com smtp.mail=laruence@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=laruence@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.42 as permitted sender) X-PHP-List-Original-Sender: laruence@gmail.com X-Host-Fingerprint: 209.85.212.42 mail-vb0-f42.google.com Received: from [209.85.212.42] ([209.85.212.42:40313] helo=mail-vb0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A6/E5-01254-090E78F4 for ; Fri, 13 Apr 2012 04:15:12 -0400 Received: by vbjk13 with SMTP id k13so2235719vbj.29 for ; Fri, 13 Apr 2012 01:15:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=hFAt7J32go1FutJVUqHkqjxlxKaAOVhRQEym0AHr3nE=; b=ChEZ6MnNPQXyhwTjgIWpVOoxDr1Fx7JAeIGOWoVGxA4qmXpgY3eD/PzNz6ubSgL40p J8oXuvRbvU8Q9TqtrGxfcRdBBuWpWAFW3JtfFc6auJq+Z95vjJJPBVYPkywTPPFZ5rQh abXIhAWacSx1DK03CkPfMm+YG65eiCD8f47VWj+Si92xmsQKnSq1KYw3rqMeBPc+wl7o bcvWdVOkUntBVmLPzJauqpziSxOaRu+dZLO7Qky0bQn65HM7CJrfuHsESl/tVCdJ6VRb Yg8fAkY+ew9/vt8MAWOQwm10D1YOPa8VSxfz1CKu8PRY8j0S2exXHVUf+wwDS0ZdPaKD JVvA== Received: by 10.220.228.200 with SMTP id jf8mr394760vcb.0.1334304909262; Fri, 13 Apr 2012 01:15:09 -0700 (PDT) MIME-Version: 1.0 Sender: laruence@gmail.com Received: by 10.220.18.194 with HTTP; Fri, 13 Apr 2012 01:14:49 -0700 (PDT) In-Reply-To: <4F87DF77.7040608@mail.by> References: <4F87DF77.7040608@mail.by> Date: Fri, 13 Apr 2012 16:14:49 +0800 X-Google-Sender-Auth: SbZEhYF2yOIzZYcD9APdl8qGyqI Message-ID: To: Verbitsky Alexander Cc: internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] Allow "use( $longname as $alias)" syntax for closures declaration From: laruence@php.net (Laruence) On Fri, Apr 13, 2012 at 4:10 PM, Verbitsky Alexander wrote: > On 04/12/2012 06:38 PM, Laruence wrote: >> >> Hi: >> =C2=A0 =C2=A0 =C2=A0I have made a RFC to allow user use T_AS in the clos= ure declaration, >> like: >> >> =C2=A0 =C2=A0 =C2=A0function () use($long as $l,&$long as $r) { >> >> =C2=A0 =C2=A0 =C2=A0} >> >> =C2=A0 =C2=A0 =C2=A0here is the RFC: https://wiki.php.net/rfc/useas >> >> =C2=A0 =C2=A0 =C2=A0any ideas? =C2=A0thanks >> > Closure is a functional literal that can pull with itself all variables > visible in current scope where it was created. Hi: you mean dup a EG(active_symbol_table)? it's too expensive, IMO. thanks > 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. > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > --=20 Laruence =C2=A0Xinchen Hui http://www.laruence.com/