Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:89491 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23793 invoked from network); 30 Nov 2015 12:18:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Nov 2015 12:18:54 -0000 Authentication-Results: pb1.pair.com smtp.mail=petercowburn@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=petercowburn@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.180 as permitted sender) X-PHP-List-Original-Sender: petercowburn@gmail.com X-Host-Fingerprint: 209.85.160.180 mail-yk0-f180.google.com Received: from [209.85.160.180] ([209.85.160.180:36491] helo=mail-yk0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0F/6B-04444-DAE3C565 for ; Mon, 30 Nov 2015 07:18:53 -0500 Received: by ykdr82 with SMTP id r82so180253299ykd.3 for ; Mon, 30 Nov 2015 04:18:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=LEaxstljyij0+qDxWu200o2iSlrhOSrbTfGFsw4JkdA=; b=Rb/U6/bMDPCaybeZF2wi9HrkYiWB+/42dYMNR8Nu7HPGP8nSDJBaSNsi3WtvN5HxfG o3Hcx6X/VpEEGu1eOcM81sVeLLfozFosFzs7QCv0saZU/X1BXlKB2KT9zvIcqeziAwva 9Da0OC10SuqSU5dLEIHYde5QyfeNdEy8g/SqTLX9CHEbE9ZdJpNmWRYo6esaT+Nbdus1 Kawdwby6/hCiCe8wr38+FkZEaDX2bc6UfoaMSLZYARbZBnJB+3Q0ViqDcylpHGPqtPd9 Fw4RMHIiiIT8mww58Kt5hwQImcv3q8i0tIBaqDE9o9js7zVZ1N3HWhu93FPrIATQSHk+ ig5w== X-Received: by 10.129.71.134 with SMTP id u128mr45698471ywa.91.1448885931094; Mon, 30 Nov 2015 04:18:51 -0800 (PST) MIME-Version: 1.0 Received: by 10.129.53.142 with HTTP; Mon, 30 Nov 2015 04:18:11 -0800 (PST) In-Reply-To: References: Date: Mon, 30 Nov 2015 12:18:11 +0000 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary=001a114d713e3e3a510525c10b63 Subject: Re: static:: and PHP 7 (from bug #70997) From: petercowburn@gmail.com (Peter Cowburn) --001a114d713e3e3a510525c10b63 Content-Type: text/plain; charset=UTF-8 On 30 November 2015 at 12:16, Peter Cowburn wrote: > Hi internals, > > I'm looking for some feedback on a change with regard to static::, which > has been present throughout the 7 branch. > > Have a look-see at https://bugs.php.net/bug.php?id=70997 > > > class A { > const TEST = false; > public function test() { > var_dump(static::TEST); > } > } > > class B extends A { > const TEST = true; > > public function test() { > A::test(); > } > } > > $b = new B; > $b->test(); > > ?> > > In PHP 7 it dumps true, in PHP 5 false. > Gah, this was inevitable! In PHP 7 it dumps FALSE, in PHP 5 TRUE. Stupid brain. > > I'm looking for info on when, where, why it was introduced, and ultimately > some clarification of: > a) was this intentional > b) it is going to stay (i.e. "not a bug") > c) some more to go on so I can document the change clearly > > If there is already a line in NEWS/UPGRADING or a commit you can point me > to, that would be amazing. > > Whatever tangents this topic wanders off on, I'd like to eventually pull > it back to the bug report mentioned above with one eye on formulating the > docs changes (if it's really "not a bug"). > > Cheers, > > A docs guy. > > --001a114d713e3e3a510525c10b63--