Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97694 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8929 invoked from network); 11 Jan 2017 18:13:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Jan 2017 18:13:43 -0000 Authentication-Results: pb1.pair.com header.from=bobwei9@hotmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=bobwei9@hotmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain hotmail.com designates 65.55.111.170 as permitted sender) X-PHP-List-Original-Sender: bobwei9@hotmail.com X-Host-Fingerprint: 65.55.111.170 blu004-omc4s31.hotmail.com Received: from [65.55.111.170] ([65.55.111.170:51540] helo=BLU004-OMC4S31.hotmail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E8/B3-55699-5D576785 for ; Wed, 11 Jan 2017 13:13:42 -0500 Received: from BLU436-SMTP20 ([65.55.111.136]) by BLU004-OMC4S31.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Wed, 11 Jan 2017 10:13:39 -0800 X-TMN: [KxfnLXZ0rwIslkLDm+0hznCsqTO8AmyP] X-Originating-Email: [bobwei9@hotmail.com] Message-ID: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) In-Reply-To: Date: Wed, 11 Jan 2017 19:13:33 +0100 CC: Derick Rethans , PHP internals list , Joe Watkins , Zeev Suraski , "Anatol Belski (ab@php.net)" , Nikita Popov , Xinchen Hui Content-Transfer-Encoding: quoted-printable References: To: Dmitry Stogov X-Mailer: Apple Mail (2.3251) X-OriginalArrivalTime: 11 Jan 2017 18:13:37.0233 (UTC) FILETIME=[6DBD6C10:01D26C36] Subject: Re: [PHP-DEV] Change in type-hint representation From: bobwei9@hotmail.com (Bob Weinand) > Am 11.01.2017 um 17:37 schrieb Dmitry Stogov : >=20 > The patch was updated according to feedback: added comments, better = names and encapsulation, less magic, better code reuse, keep a free bit = in zend_type for future extension. > >=20 >=20 > >=20 > https://gist.github.com/dstogov/1b25079856afccf0d69f77d499cb0ab1 >=20 >=20 > Thanks. Dmitry. Looks good so far=E2=80=A6 Thought I've asked you before on IRC to somehow extract validation so = that we don't have to duplicate it everywhere. Validate (and cast if necessary) given a zval, strict mode and the = representation type (class present as ce? as string?) Also, perhaps a string representation of the type (reusable in = reflection and in error messages) Thanks, Bob=