Larry Garfield wrote:
On Tuesday 05 August 2008 12:48:37 am Moriyoshi Koizumi wrote:
I don't think there are many differences in ambiguity between
$closure = function ($arg) { use $a;
...
};
and
$closure = function ($arg) use ($a) {
};
Moriyoshi
--
Moriyoshi Koizumi <[EMAIL PROTECTED]>
The former has no good way to differentiate between by-ref and by-value
importing. The latter has a very intuitive way. That's why (IIRC) it was
used.
The only difference I could see between the two is the presence of
parenthesis. I doubt they contribute to the intuitiveness that much.
function ($arg) { use $a, &$b;
v.s.
function ($arg) use ($a, &$b) {
Moriyoshi
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php