Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:74118 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 698 invoked from network); 11 May 2014 03:12:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 May 2014 03:12:09 -0000 Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.169 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.214.169 mail-ob0-f169.google.com Received: from [209.85.214.169] ([209.85.214.169:38637] helo=mail-ob0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 28/10-33480-88AEE635 for ; Sat, 10 May 2014 23:12:08 -0400 Received: by mail-ob0-f169.google.com with SMTP id vb8so6622395obc.14 for ; Sat, 10 May 2014 20:12:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=568qFOOlnb/lp04DJx8q+EXXj6th1U9jIIGrdgZyLz4=; b=J5z7A+423FR90nzzTtLKSX481uXIAHhAfrS15he7a2u2MozhY8MHDiYDeB/WjFCKhc ljq6fddvIw49UWNWzf784a1kQ2mENEJnGbjQuQpsTIxwAZbjvqcbJ8hvsehay0BWV2ev pOVID/2zn/Ap3SQBz8/gKPsBnQ0r+ia8+AmGHqYNXdZvXC9CZ0M3dqWPUSEDlTiIw6zJ QIe0XKPBZEYN3tPb51E/9jSUAtvcQH5FyGRmuHcqparNWeBvdUMuL0tWK3K+W9lUY0Tb MRcwuppAUqpt2dOosYTzyeLRyvjxwhp5nanx+SN22yn2hfbvGGUk/YnQE5oCijcYt2LX iK3Q== MIME-Version: 1.0 X-Received: by 10.60.115.202 with SMTP id jq10mr25063890oeb.0.1399777925726; Sat, 10 May 2014 20:12:05 -0700 (PDT) Received: by 10.76.77.100 with HTTP; Sat, 10 May 2014 20:12:05 -0700 (PDT) In-Reply-To: <536D3C30.9010801@sugarcrm.com> References: <536D3C30.9010801@sugarcrm.com> Date: Sat, 10 May 2014 21:12:05 -0600 Message-ID: To: Stas Malyshev Cc: internals Content-Type: multipart/alternative; boundary=089e0118324007064504f91732b0 Subject: Re: [PHP-DEV] Anonymous functions inside static methods. From: morrison.levi@gmail.com (Levi Morrison) --089e0118324007064504f91732b0 Content-Type: text/plain; charset=UTF-8 There was a reply to this list from Sanford Whiteman which I never received: http://marc.info/?l=php-internals&m=139959267615452&w=2 Contents posted below: > 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. --089e0118324007064504f91732b0--