Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:74075 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 33607 invoked from network); 8 May 2014 23:43:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 May 2014 23:43:50 -0000 Authentication-Results: pb1.pair.com header.from=swhitemanlistens-software@cypressintegrated.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=swhitemanlistens-software@cypressintegrated.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain cypressintegrated.com designates 173.1.104.101 as permitted sender) X-PHP-List-Original-Sender: swhitemanlistens-software@cypressintegrated.com X-Host-Fingerprint: 173.1.104.101 rproxy2-b-iv.figureone.com Received: from [173.1.104.101] ([173.1.104.101:62829] helo=rproxy2-b-iv.figureone.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8D/48-15882-4B61C635 for ; Thu, 08 May 2014 19:43:49 -0400 Received: from 124.1.168.192.in-addr.arpa ([108.12.130.219]) by rproxy2-b-iv.figureone.com (Brand New Heavy v1.0) with ASMTP id UCZ80741 for ; Thu, 08 May 2014 16:43:41 -0700 Date: Thu, 8 May 2014 19:43:45 -0400 Reply-To: Sanford Whiteman X-Priority: 3 (Normal) Message-ID: <476708339.20140508194345@cypressintegrated.com> To: Levi Morrison In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Anonymous functions inside static methods. From: swhitemanlistens-software@cypressintegrated.com (Sanford Whiteman) > I think Bar::bar() should definitely return 'Bar' (currently returns > 'Foo') but what about the Bar::Baz() call? I kinda agree, but that ship has sailed and it would be a BC break. You can do $foo->bindTo(null,Bar) even if the closure is static. Actually, it seems that when you call the parent function statically, the child closure is considered static no matter what else you do. So even force-running a parent function statically at runtime (disregarding the warning) means it and its child closures will behave as if they had the `static` keyword. I note in your 3v4l that HHVM does not follow the same rules. -- S.