Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:74119 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2271 invoked from network); 11 May 2014 03:18:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 May 2014 03:18:25 -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.219.44 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.219.44 mail-oa0-f44.google.com Received: from [209.85.219.44] ([209.85.219.44:38845] helo=mail-oa0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AC/60-33480-FFBEE635 for ; Sat, 10 May 2014 23:18:25 -0400 Received: by mail-oa0-f44.google.com with SMTP id i11so6757789oag.3 for ; Sat, 10 May 2014 20:18:21 -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=8oZ7m0dRe/jm0WK1i4ienWKtFr8BR6FbAJ2yu+S0wFQ=; b=MP/C70eYT+TT+qkB/Cg6lHWy52NtOdkHtR5pFaoGoEWeNBxmAvDBAT/Lm/JcYkq5em ep2JourZHIE7fD+p2FED7Gb5dBuhNEES59ACNwIR+N6M6RRxHsqrQXrMbcGzlHWkmKGZ EAPcWJJDrMgdvTo+NRyaaHnJwgNeEgx9JvvK8FryPqK2JLWc6vHPWgkd0PJ9gN/ExOfU aonilHg35wFEyTGUva8a7SG5hsSpdgrRU5TK0mNInEPIPkLfl2crIpDanypprWucx3ZO yVEniWuiVmWAziDcN8oilUuJrMRHEQxKELCDh8eaZ1eanVcD4fva6996RmwgqWfvpJ4L 7Kmw== MIME-Version: 1.0 X-Received: by 10.60.159.36 with SMTP id wz4mr25121475oeb.30.1399778301443; Sat, 10 May 2014 20:18:21 -0700 (PDT) Received: by 10.76.77.100 with HTTP; Sat, 10 May 2014 20:18:21 -0700 (PDT) In-Reply-To: References: <536D3C30.9010801@sugarcrm.com> Date: Sat, 10 May 2014 21:18:21 -0600 Message-ID: To: Stas Malyshev Cc: internals Content-Type: multipart/alternative; boundary=047d7bd74ce06c039904f91748d4 Subject: Re: [PHP-DEV] Anonymous functions inside static methods. From: morrison.levi@gmail.com (Levi Morrison) --047d7bd74ce06c039904f91748d4 Content-Type: text/plain; charset=UTF-8 On Sat, May 10, 2014 at 9:12 PM, Levi Morrison wrote: > > > 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. > Yes... but we fix bugs all the time that are technically BC breaks. Do you really think we shouldn't fix this? I note in your 3v4l that HHVM does not follow the same rules. > I think HHVM gets the Bar::bar() case correct and we should fix it. I'm not sure if I agree with HHVM's outcome on Bar::baz(). To me the closure is non-static which means it won't invoke late static binding. This is something I'd like to discuss; what do you guys think about that? Another option is to implicitly promote closures inside of static contexts to be also be static; this is basically what HHVM does. --047d7bd74ce06c039904f91748d4--