Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:89493 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27566 invoked from network); 30 Nov 2015 12:47:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Nov 2015 12:47:35 -0000 Authentication-Results: pb1.pair.com smtp.mail=bobwei9@hotmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=bobwei9@hotmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain hotmail.com designates 65.55.111.86 as permitted sender) X-PHP-List-Original-Sender: bobwei9@hotmail.com X-Host-Fingerprint: 65.55.111.86 blu004-omc2s11.hotmail.com Received: from [65.55.111.86] ([65.55.111.86:59855] helo=BLU004-OMC2S11.hotmail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 92/2C-04444-6654C565 for ; Mon, 30 Nov 2015 07:47:34 -0500 Received: from BLU436-SMTP258 ([65.55.111.71]) by BLU004-OMC2S11.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Mon, 30 Nov 2015 04:47:31 -0800 X-TMN: [VICFG4tQSjK/PiPx+xvCaCt6FwXMLdT6Caf92cOcMb8=] X-Originating-Email: [bobwei9@hotmail.com] Message-ID: Content-Type: multipart/alternative; boundary="Apple-Mail=_D4D7F2ED-8FD9-4961-A918-357E28A5DDB7" MIME-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) In-Reply-To: <565C3FD7.6000602@heigl.org> Date: Mon, 30 Nov 2015 13:47:26 +0100 CC: Peter Cowburn , PHP internals References: <565C3FD7.6000602@heigl.org> To: Andreas Heigl X-Mailer: Apple Mail (2.2070.6) X-OriginalArrivalTime: 30 Nov 2015 12:47:29.0163 (UTC) FILETIME=[45B8E5B0:01D12B6D] Subject: Re: [PHP-DEV] static:: and PHP 7 (from bug #70997) From: bobwei9@hotmail.com (Bob Weinand) --Apple-Mail=_D4D7F2ED-8FD9-4961-A918-357E28A5DDB7 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" > Am 30.11.2015 um 13:23 schrieb Andreas Heigl : >=20 > Am 30.11.15 um 13:18 schrieb Peter Cowburn: >> class A { >>> const TEST =3D false; >>> public function test() { >>> var_dump(static::TEST); >>> } >>> } >>>=20 >>> class B extends A { >>> const TEST =3D true; >>>=20 >>> public function test() { >>> A::test(); >>> } >>> } >>>=20 >>> $b =3D new B; >>> $b->test(); >>>=20 > You are calling explicitly A::test(). >=20 > When you call parent::test() everything works as you'd expect it. >=20 > Have a look at https://3v4l.org/RCrRd >=20 > Apart from that you are calling an instance-method as a static method = by > using A::test(). >=20 > Cheers >=20 > Andreas We do that, because we may not have any other choice, e.g. when calling = a great-parents method. To then use LSB, we have to explicitly name our = parent. This is now not possible anymore, and hence I=E2=80=99d consider this as = a BC break at least, if not a bug. This definitely is not simply *not a bug*. Bob --Apple-Mail=_D4D7F2ED-8FD9-4961-A918-357E28A5DDB7--