Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:72951 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59252 invoked from network); 5 Mar 2014 22:26:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Mar 2014 22:26:07 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 108.166.43.99 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 108.166.43.99 smtp99.ord1c.emailsrvr.com Linux 2.6 Received: from [108.166.43.99] ([108.166.43.99:48191] helo=smtp99.ord1c.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 25/C0-55049-E74A7135 for ; Wed, 05 Mar 2014 17:26:06 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp5.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id C03DC1B0DE3; Wed, 5 Mar 2014 17:26:03 -0500 (EST) X-Virus-Scanned: OK Received: by smtp5.relay.ord1c.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 74A191B0C15; Wed, 5 Mar 2014 17:26:03 -0500 (EST) Message-ID: <5317A479.4020102@sugarcrm.com> Date: Wed, 05 Mar 2014 14:26:01 -0800 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: Andrey Andreev , "internals@lists.php.net" References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] T_AS in closures From: smalyshev@sugarcrm.com (Stas Malyshev) 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 */ }; What this allows to do that simple $baz = $foo and use $baz wouldn't do? I think adding syntax that does not substantially expand what you can do is not right. It just makes language larger and harder to learn and understand. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227