Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79009 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 74670 invoked from network); 19 Nov 2014 19:06:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Nov 2014 19:06:16 -0000 Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 192.64.116.216 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.216 imap10-3.ox.privateemail.com Received: from [192.64.116.216] ([192.64.116.216:60194] helo=imap10-3.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 77/50-07312-72AEC645 for ; Wed, 19 Nov 2014 14:06:16 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 517952400D6; Wed, 19 Nov 2014 14:06:13 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at imap10.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap10.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id dP7iBVAepgE3; Wed, 19 Nov 2014 14:06:13 -0500 (EST) Received: from oa-res-27-29.wireless.abdn.ac.uk (oa-res-27-29.wireless.abdn.ac.uk [137.50.27.29]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id C9CC32400E5; Wed, 19 Nov 2014 14:06:11 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) In-Reply-To: <9d45996a7ea75ce05e30693c0a9491af.squirrel@webmail.klapt.com> Date: Wed, 19 Nov 2014 19:06:09 +0000 Cc: Yasuo Ohgaki , PHP Internals Content-Transfer-Encoding: quoted-printable Message-ID: References: <66B7B28C-2651-4A71-AC2A-55D4C7BB3DDC@ajf.me> <656B2A54-572B-4E6A-892B-25FAE428F434@ajf.me> <3844e0dd17eef0f8991dd01eda533e2e.squirrel@webmail.klapt.com> <1433D80F-85DF-45A9-B9E8-2E48E0B6321C@ajf.me> <81B335A0-28EA-421E-B568-994E14A68604@ajf.me> <9d45996a7ea75ce05e30693c0a9491af.squirrel@webmail.klapt.com> To: Anatol Belski X-Mailer: Apple Mail (2.1993) Subject: Re: [PHP-DEV] [RFC] Safe Casting Functions From: ajf@ajf.me (Andrea Faulds) > On 19 Nov 2014, at 19:04, Anatol Belski wrote: >=20 > Yeah, try_string(new A) =3D=3D (string)(new A), but try_int(new A) !=3D > (int)(string)(new A) in the RFC. Whereby '10' were pretty valid for = int, > no? Oh, you=E2=80=99re saying how to_int/to_float don=E2=80=99t accept = __toString objects. I suppose they could, but (int) and (float) don=E2=80=99= t accept that, nor do we accept that anywhere else. -- Andrea Faulds http://ajf.me/