Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93513 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 97918 invoked from network); 25 May 2016 16:20:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 May 2016 16:20:14 -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.100 as permitted sender) X-PHP-List-Original-Sender: bobwei9@hotmail.com X-Host-Fingerprint: 65.55.111.100 blu004-omc2s25.hotmail.com Received: from [65.55.111.100] ([65.55.111.100:61647] helo=BLU004-OMC2S25.hotmail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 39/83-14311-DB0D5475 for ; Wed, 25 May 2016 12:20:13 -0400 Received: from BLU437-SMTP20 ([65.55.111.71]) by BLU004-OMC2S25.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Wed, 25 May 2016 09:20:10 -0700 X-TMN: [sAoRaSDdQq68eQaQ+xjiHjHtdmBrJ02q] X-Originating-Email: [bobwei9@hotmail.com] Message-ID: Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) In-Reply-To: Date: Wed, 25 May 2016 18:20:06 +0200 CC: "internals@lists.php.net" Content-Transfer-Encoding: quoted-printable References: <7B.12.14311.F79C5475@pb1.pair.com> To: James Gilliland X-Mailer: Apple Mail (2.3112) X-OriginalArrivalTime: 25 May 2016 16:20:08.0609 (UTC) FILETIME=[4E0F9910:01D1B6A1] Subject: Re: [PHP-DEV] [RFC][Vote] Typed Properties From: bobwei9@hotmail.com (Bob Weinand) > Am 25.05.2016 um 17:57 schrieb James Gilliland : >=20 > This is a cool idea and continuation of the typing systems so I've = been > sort of skimming this thread as its been discussed and this example = and the > associated errors caught my attention. >=20 >> class C { >> public $a; >> public int $b; >> public ?int $c; >> } >> $obj =3D new C; >>=20 >=20 > Excuse me if this has been addressed but to clarify, using that = snippet, > would this also throw an error? >=20 > var_dump($obj); >=20 > If so, I see a lot of cursing in my future if this goes in. Like = "what's > the bad data on this object that's getting in here? aww #$%^ that > deprecated property wasn't set so the whole thing blew up!" sort of > cursing. :( These don't throw errors, they just won't appear upon foreach or print_r = etc., just like other unset() properties. var_dump()/debug_zval_dump() are special casing it and display e.g. = "uninitialized(int)" for $b. Bob=