Re: PATCH: anonymous functions in PHP

From: Date: Mon, 19 Mar 2007 23:06:19 +0000
Subject: Re: PATCH: anonymous functions in PHP
References: 1 2 3 4 5 6 7 8 9 10 11 12 13  Groups: php.internals 
Request: Send a blank email to internals+get-28471@lists.php.net to get a copy of this message
Richard Lynch wrote:
I'd be perfectly happy if PHP's "anonymous" functions had the nice syntax and no funky weird stuff about closure, a la eval/create_function, personally.
While the discussion about closures and how to emulate them was interesting I think Richard hits the nail on the head. 1. Keep it simple as in Wez' patch. 2. Maybe make it return a callback array (object, method) if used with class to be able to use $this. 3. Maybe add $_SCOPE a la Andi's proposal if you really think it's worthwhile. My two cents, - Chris

« previous php.internals (#28471) next »