Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:28471 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 88265 invoked by uid 1010); 19 Mar 2007 23:06:25 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 88250 invoked from network); 19 Mar 2007 23:06:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Mar 2007 23:06:25 -0000 Authentication-Results: pb1.pair.com header.from=cschneid@cschneid.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=cschneid@cschneid.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain cschneid.com from 195.226.6.51 cause and error) X-PHP-List-Original-Sender: cschneid@cschneid.com X-Host-Fingerprint: 195.226.6.51 darkcity.gna.ch Linux 2.6 Received: from [195.226.6.51] ([195.226.6.51:51008] helo=mail.gna.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 39/AA-01604-F671FF54 for ; Mon, 19 Mar 2007 18:06:25 -0500 Received: from localhost (localhost [127.0.0.1]) by darkcity.gna.ch (Postfix) with ESMTP id 4495293CFD for ; Tue, 20 Mar 2007 00:06:20 +0100 (CET) Received: from unknown by localhost (amavisd-new, unix socket) id client-XXIZjgeQ for ; Tue, 20 Mar 2007 00:06:19 +0100 (CET) Received: from [192.168.1.42] (217-162-171-242.dclient.hispeed.ch [217.162.171.242]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by darkcity.gna.ch (Postfix) with ESMTP id 6A38B35505 for ; Tue, 20 Mar 2007 00:06:19 +0100 (CET) Message-ID: <45FF176B.9090102@cschneid.com> Date: Tue, 20 Mar 2007 00:06:19 +0100 User-Agent: Thunderbird 1.5.0.10 (Macintosh/20070221) MIME-Version: 1.0 To: internals@lists.php.net References: <86478A67-DCA2-4000-9EF0-DA4338E8389B@omniti.com> <45FDF031.4010508@zend.com> <45FE2312.1050506@zend.com> <45FED6D9.8030307@caedmon.net> <45FEDAE5.2010309@zend.com> <45FEE396.7040905@caedmon.net> <0757BDEA-65F5-4123-B647-060DCA84B4B0@omniti.com> <32945.216.230.84.67.1174340098.squirrel@www.l-i-e.com> <45FF06B4.2060801@zend.com> <41955.216.230.84.67.1174343185.squirrel@www.l-i-e.com> <45FF0FBB.8040100@zend.com> <50400.216.230.84.67.1174344483.squirrel@www.l-i-e.com> In-Reply-To: <50400.216.230.84.67.1174344483.squirrel@www.l-i-e.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at gna.ch Subject: Re: [PHP-DEV] PATCH: anonymous functions in PHP From: cschneid@cschneid.com (Christian Schneider) 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