Hi! > To me it's not about renaming variables, but rather avoiding to clutter > the parent scope with variables, e.g.: > > $closure = function () use ($this->getFooBar() as $foo) { > $foo->stuff(); > } >
That sounds like an interesting idea. If it can be done properly (i.e., what if that expression throws exception or produces error? We need to be careful not to leave the engine in weird state there) that may be nice. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php