Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:72945 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43348 invoked from network); 5 Mar 2014 21:28:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Mar 2014 21:28:53 -0000 Authentication-Results: pb1.pair.com smtp.mail=narf@devilix.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=narf@devilix.net; sender-id=pass Received-SPF: pass (pb1.pair.com: domain devilix.net designates 209.85.213.68 as permitted sender) X-PHP-List-Original-Sender: narf@devilix.net X-Host-Fingerprint: 209.85.213.68 mail-yh0-f68.google.com Received: from [209.85.213.68] ([209.85.213.68:37996] helo=mail-yh0-f68.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9E/D8-32928-41797135 for ; Wed, 05 Mar 2014 16:28:53 -0500 Received: by mail-yh0-f68.google.com with SMTP id a41so551278yho.3 for ; Wed, 05 Mar 2014 13:28:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=devilix.net; s=google; h=mime-version:date:message-id:subject:from:to:content-type; bh=sSr0WZDdgyEl7ZBs3rZZvGiXtnPap43+6wFCMaHVdpE=; b=q0YRXxfMyrG8zxGSo+DOtTc823yEZWWLdBUweBtn0NrviGlGOL4OKPqx+yZxIspUYC 6c/dXqaTVORyldr5cAzLfuTvW2Se0RjpRfLt1kRWBFmHURDMKVtgwo+rEHrgyjNyCENo nRgbmUimBvnGf8y0xezIv5JujV0wryqTIfua8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=sSr0WZDdgyEl7ZBs3rZZvGiXtnPap43+6wFCMaHVdpE=; b=D2V+IxQl3moKxLyYsOgKwjSLzDt0vgKy+I5RrQaGUsdZOGZzbuyS2r85DnBp6GYLPR 2UVRM2KKv+guq6C4TFrNnGsd8POQpjjUesnsMHt3VhIkfoYmkJmlp1uVRRpcPDqz23AY RJYNA8rm6THWm6YI8uofzXlg/ukS1hi8i85UZdM67lhNtKqFTeSBQ9vLnI1DUb9OR0xN /vE6Lru55pzBv4CrTO875wRu3JlRy9G9Ms2TPwV045MoyFpDs5WHRWZvV4KlBiP0DX+K 6QOkq7E/9287e133tuTGBwyp+cz9uoAuPfSpxV/EvPTTaA+VU5kBgPNSvNZzg2ptEvfJ t5CQ== X-Gm-Message-State: ALoCoQlfH9CXFPMMJ0o0pZoRc8lwIv4pRUBrvAWm6fK7P/dpl/0hijITzcg5TsocBs0i3f1W706N MIME-Version: 1.0 X-Received: by 10.236.119.141 with SMTP id n13mr4061833yhh.136.1394054929741; Wed, 05 Mar 2014 13:28:49 -0800 (PST) Received: by 10.170.188.139 with HTTP; Wed, 5 Mar 2014 13:28:49 -0800 (PST) Date: Wed, 5 Mar 2014 23:28:49 +0200 Message-ID: To: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: T_AS in closures From: narf@devilix.net (Andrey Andreev) Hi, I was clicking on bugs.php.net/random today and I came across #54888, which is a feature request for the following syntax: $foo = 'whatever'; $bar = function() use ($foo as $baz) { /* use $baz here */ }; https://bugs.php.net/bug.php?id=54888 I don't know if other languages have it, but it seems nice and considering how much developers prefer foreach() over other loops because it allows them to "rename" the variable, I'm sure people would love it. Has this been discussed before? What are your opinions on it? Regards, Andrey Andreev.