Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93866 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57650 invoked from network); 10 Jun 2016 14:12:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Jun 2016 14:12:44 -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.143 as permitted sender) X-PHP-List-Original-Sender: bobwei9@hotmail.com X-Host-Fingerprint: 65.55.111.143 blu004-omc4s4.hotmail.com Received: from [65.55.111.143] ([65.55.111.143:57678] helo=BLU004-OMC4S4.hotmail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 98/51-50092-9DACA575 for ; Fri, 10 Jun 2016 10:12:43 -0400 Received: from BLU436-SMTP89 ([65.55.111.136]) by BLU004-OMC4S4.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Fri, 10 Jun 2016 07:12:39 -0700 X-TMN: [sSKtzCY0kzRqdnrauIAG7OQo1/Ck8VFo] X-Originating-Email: [bobwei9@hotmail.com] Message-ID: Content-Type: multipart/alternative; boundary="Apple-Mail=_E9B1E6E3-0C78-41B9-81FD-952790E62F01" MIME-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) In-Reply-To: Date: Fri, 10 Jun 2016 16:12:34 +0200 CC: Marco Pivetta , Joe Watkins , Philip Sturgeon , PHP internals References: To: Niklas Keller X-Mailer: Apple Mail (2.3112) X-OriginalArrivalTime: 10 Jun 2016 14:12:36.0632 (UTC) FILETIME=[23BC9180:01D1C322] Subject: Re: [PHP-DEV] [RFC][Vote] Typed Properties From: bobwei9@hotmail.com (Bob Weinand) --Apple-Mail=_E9B1E6E3-0C78-41B9-81FD-952790E62F01 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="us-ascii" > Am 10.06.2016 um 16:00 schrieb Niklas Keller : >=20 > 2016-06-10 15:50 GMT+02:00 Bob Weinand >: >=20 >> Am 10.6.2016 um 15:34 schrieb Niklas Keller >: >>=20 >>>=20 >>> Top-posting, since I'm taking off now. >>>=20 >>> =46rom outside the class, properties are not visible at all, so = their types >>> are un-important from outer scopes. >>>=20 >>> echo $foo->bar; is not the same in instance method body or outside = of the >>> class. >>>=20 >> =46rom outside it works just fine and doesn't throw: >> https://3v4l.org/L8CqF/rfc#rfc-typed_properties = >=20 > This is an intermittent bug in the implementation. > the RFC is explicitly mentioning that it should throw and throwing = also is the correct behavior here. >=20 > I don't think this is and should be a bug. I think it is the right = behavior if we choose to throw at all.=20 In this case a definite -1 on the RFC from me. I don't want "surprises" = regarding the type if a property is declared to return a certain type. Bob= --Apple-Mail=_E9B1E6E3-0C78-41B9-81FD-952790E62F01--