Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:18309 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 78310 invoked by uid 1010); 23 Aug 2005 13:00:40 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 78295 invoked from network); 23 Aug 2005 13:00:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Aug 2005 13:00:40 -0000 Received: from ([127.0.0.1:5149]) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with ECSTREAM id E5/D0-28235-8FD1B034 for ; Tue, 23 Aug 2005 09:00:40 -0400 X-Host-Fingerprint: 64.233.162.201 zproxy.gmail.com Linux 2.4/2.6 Received: from ([64.233.162.201:61201] helo=zproxy.gmail.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 27/79-28235-5BFBA034 for ; Tue, 23 Aug 2005 02:18:29 -0400 Received: by zproxy.gmail.com with SMTP id 8so754439nzo for ; Mon, 22 Aug 2005 23:18:27 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=KAkJJFU1MEIKXRGN8xslDVKb5fDQ6041bboI+Bjmq0v9vPAOyKfzTTKpJYN3ccDEq2xxejtxi6+OLdg2PSldOA0CuGr63RMy580kT3okoCAyuz3SSH0Zh7bWYuPYndlJdD8+BowkMb0JTpTykKjr08b1l9W4+2YFaAIOA6Kri44= Received: by 10.36.24.11 with SMTP id 11mr3413018nzx; Mon, 22 Aug 2005 23:18:27 -0700 (PDT) Received: by 10.36.12.5 with HTTP; Mon, 22 Aug 2005 23:18:27 -0700 (PDT) Message-ID: <877e9a17050822231876308b57@mail.gmail.com> Date: Tue, 23 Aug 2005 02:18:27 -0400 To: Stanislav Malyshev Cc: Marcus Boerger , internals@lists.php.net In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <42FCE0E4.604@lerdorf.com> <4309DC9B.8020904@peda.net> <19310545471.20050822200017@marcus-boerger.de> Subject: Re: [PHP-DEV] Re: PHP 6.0 Wishlist From: michael.walter@gmail.com (Michael Walter) On 8/22/05, Stanislav Malyshev wrote: > MB>>> * Anonymous functions. The real stuff, not just some odd string > MB>>> passed to create_function(). > MB>> > MB>>There were some others already asking for this, maybe we should at le= ast > MB>>give it a thought if it is doable at all, anybody? >=20 > Just out of curiosity, what's bad in create_function and how "real" ones > should be different? "Real" anonymous functions (as in, closures) should be able to capture variables from its lexical environment, e.g.: function adder($a) {return function($b) {return $a+$b;}} function index($i) {return function($a) {return $a[$i];}} I'm sure you can think of useful examples. Cheers, Michael