Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58315 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 33121 invoked from network); 29 Feb 2012 01:17:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Feb 2012 01:17:16 -0000 Authentication-Results: pb1.pair.com smtp.mail=johncrenshaw@priacta.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=johncrenshaw@priacta.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain priacta.com designates 64.95.72.244 as permitted sender) X-PHP-List-Original-Sender: johncrenshaw@priacta.com X-Host-Fingerprint: 64.95.72.244 mxout.myoutlookonline.com Received: from [64.95.72.244] ([64.95.72.244:42838] helo=mxout.myoutlookonline.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D4/94-36673-B9C7D4F4 for ; Tue, 28 Feb 2012 20:17:16 -0500 Received: from mxout.myoutlookonline.com (localhost [127.0.0.1]) by mxout.myoutlookonline.com (Postfix) with ESMTP id A48D97E6578; Tue, 28 Feb 2012 20:17:12 -0500 (EST) X-Virus-Scanned: by SpamTitan at mail.lan Received: from HUB024.mail.lan (unknown [10.110.2.1]) by mxout.myoutlookonline.com (Postfix) with ESMTP id 4D0037E634A; Tue, 28 Feb 2012 20:17:12 -0500 (EST) Received: from MAILR001.mail.lan ([10.110.18.27]) by HUB024.mail.lan ([10.110.17.24]) with mapi; Tue, 28 Feb 2012 20:17:04 -0500 To: Kris Craig , Rick WIdmer CC: "internals@lists.php.net" Date: Tue, 28 Feb 2012 20:17:08 -0500 Thread-Topic: [PHP-DEV] Scalar type hinting Thread-Index: Acz2bZ+HZ7mQNw0qSTus+cQS2JZH+wAENLyw Message-ID: References: <1330357150.2159.30.camel@guybrush> <693e15008681dfe7372eaea66214f8a8.squirrel@www.l-i-e.com> <4F4D5D44.5090307@developersdesk.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: RE: [PHP-DEV] Scalar type hinting From: johncrenshaw@priacta.com (John Crenshaw) > On Tue, Feb 28, 2012 at 3:03 PM, Rick WIdmer w= rote: > > > On 2/28/2012 2:58 PM, Kris Craig wrote: > > > > strong int $a =3D "1"; // Converts to 1. May or may not throw an erro= r=20 > > (I'm > >> still on the fence). > >> > > > > It this is an error, it is no longer PHP. > > >=20 > @Rick Though I'm not sure I'd agree with the overly broad "it is no longe= r PHP" hyperbole, I think the basic point that it would be a significant de= parture from the current model has merit. So ok, you've convinced me. That example should not throw any errors. I'm officially no longer on the = fence with that. =3D) > > --Kris OK, if we're all on the same page there, I think this means that there is n= o significant difference between the "strong int" and "weak int" in your pr= oposal (the only remaining difference being the level of error raised when = it cannot be converted, which IMO is not substantial enough to deserve a ke= yword.) I'd prefer to just pick one error level to use (E_RECOVERABLE_ERROR= would be the most consistent) and keep everything simple. John Crenshaw Priacta, Inc.