Re: T_AS in closures
| From: | Stas Malyshev | Date: | Wed, 05 Mar 2014 22:26:01 +0000 |
| Subject: | Re: T_AS in closures | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-72951@lists.php.net to get a copy of this message | ||
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