Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41524 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9432 invoked from network); 28 Oct 2008 14:41:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Oct 2008 14:41:19 -0000 Authentication-Results: pb1.pair.com header.from=kalle.php@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=kalle.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 72.14.220.159 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: kalle.php@gmail.com X-Host-Fingerprint: 72.14.220.159 fg-out-1718.google.com Received: from [72.14.220.159] ([72.14.220.159:65515] helo=fg-out-1718.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5B/A8-00734-C8427094 for ; Tue, 28 Oct 2008 09:41:17 -0500 Received: by fg-out-1718.google.com with SMTP id 16so2632183fgg.23 for ; Tue, 28 Oct 2008 07:41:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=Wcv/K72gG0dklbpEZE1+BeJ5odVR5qWSfh1r1lWNJLg=; b=xZKNX3247rQrrqAmcqxFsHeDBqjSxcgIHzDmhk/VcPiOFTgGkmmg0U+BSKZxKUeWYO qy0LoAcd7T7sNwae6DKl+3kAbThAMdZ6lDPh7rT7LFNTpw/X8yjyvVcD27cg/dnq7tei fhm7g5nHZThDRwOh30QSN1zfiMmO6WLMhcPJs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=LH/DsNd+4PizEwRyqf8uiKl3t7fCtn0K9GFveYYPqgoDPIJ1JsLWTN5vfbB1UwiaWm vUFEu3LjekBb0TU+dNXrYoQfHfZJhrOoF+kIKGgvFLA3w4HQbfM6InbtSI0jD9xXELiF gx+DnV/2zayzlPVVCR1v7WhDhAeuLVDnYjCq0= Received: by 10.187.186.16 with SMTP id n16mr692324fap.20.1225204873839; Tue, 28 Oct 2008 07:41:13 -0700 (PDT) Received: by 10.187.218.19 with HTTP; Tue, 28 Oct 2008 07:41:13 -0700 (PDT) Message-ID: <2dedb8a0810280741qc90cbc7s8e85070420099dab@mail.gmail.com> Date: Tue, 28 Oct 2008 15:41:13 +0100 To: "Stan Vassilev | FM" Cc: "PHP Internals" In-Reply-To: <33DADC3EA90C4AD7ADCFA0C52ECB1F21@pc> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4900DB81.4000805@zend.com> <4900E150.1010607@dynom.nl> <49018FC3.90302@gmail.com> <1224854888.19390.89.camel@goldfinger.johannes.nop> <490609A1.7090400@gravitonic.com> <1225199800.878.0.camel@localhost> <49071AF4.6080908@gmail.com> <2dedb8a0810280723m2f021a5bsc1850249ebdd4fc9@mail.gmail.com> <33DADC3EA90C4AD7ADCFA0C52ECB1F21@pc> Subject: Re: [PHP-DEV] array_key_exists BC break From: kalle.php@gmail.com ("Kalle Sommer Nielsen") 2008/10/28 Stan Vassilev | FM : >> > class Test >> { >> public function hello($who) >> { >> echo 'Hello ' . $who; >> } >> } >> >> $closure = function() >> { >> static $instance; >> >> if(!$instance) >> { >> $instance = new Test; >> } >> >> return($instance); >> }; >> >> $closure->hello('Kalle'); // Fatal error, undefined method >> Closure::hello() >> >> But you should indeed make an RFC for this and even create a patch if >> you're able to :) > > Technically since the closure holds a function returning the object, it > should be: doh yes, I must be sleeping :) > > $closure()->hello('Kalle'); > > Regards, Stan Vassilev > -- Kalle Sommer Nielsen