Re: [PATCH] [RFC] Closures and lambda functions in PHP

From: Date: Mon, 23 Jun 2008 17:56:17 +0000
Subject: Re: [PATCH] [RFC] Closures and lambda functions in PHP
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-38554@lists.php.net to get a copy of this message
Hi!
Hmm, seems like a good idea. If nobody objects in the next few days, I'll rewrite my patch to use objects instead of resources. What class name do you suggest?
While we are at it maybe even having special standard handler (__invoke?) that could be also used by objects created by reflection and maybe later of some other purposes. I.e. if we do $foo($bar, $baz) and $foo is an object and it defines __invoke, then we call it (in which case if $foo is Closure it does its thing) otherwise we get an error "object $foo is not callable". Of course, this goes also for is_callable, etc. What do you think? -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com

« previous php.internals (#38554) next »