Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78162 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51313 invoked from network); 20 Oct 2014 23:18:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Oct 2014 23:18:48 -0000 Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 198.187.29.244 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 198.187.29.244 imap1-3.ox.privateemail.com Received: from [198.187.29.244] ([198.187.29.244:47882] helo=imap1-3.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 68/51-42514-85895445 for ; Mon, 20 Oct 2014 19:18:48 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id BEEEAB0008E; Mon, 20 Oct 2014 19:18:44 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at imap1.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap1.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id BKJ2fX1YVrSc; Mon, 20 Oct 2014 19:18:44 -0400 (EDT) Received: from oa-res-26-28.wireless.abdn.ac.uk (oa-res-26-28.wireless.abdn.ac.uk [137.50.26.28]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id F2389B00085; Mon, 20 Oct 2014 19:18:43 -0400 (EDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.0 \(1990.1\)) In-Reply-To: Date: Tue, 21 Oct 2014 00:18:41 +0100 Cc: PHP Internals Content-Transfer-Encoding: quoted-printable Message-ID: <6846D348-8BB7-40E4-9562-3E9C9374244B@ajf.me> References: <66B7B28C-2651-4A71-AC2A-55D4C7BB3DDC@ajf.me> To: Haralan Dobrev X-Mailer: Apple Mail (2.1990.1) Subject: Re: [PHP-DEV] [RFC] Safe Casting Functions From: ajf@ajf.me (Andrea Faulds) > On 21 Oct 2014, at 00:16, Haralan Dobrev wrote: >=20 > In general I like this RFC. >=20 > I don't see why to_string would not accept and cast integers and = floats to strings. And even if there is a valid reason it is not = mentioned. It does accept and cast integers and floats to strings=E2=80=A6 I made = an error in the Proposal section, my bad. If you look at the examples = table and the tests in the patch, they are indeed accepted. > If this gets accepted you should consider the naming in the user = documentation. Beginners should not consider these functions "safe" as = in "security", but only "safe" as in "no data loss=E2=80=9D. Right. -- Andrea Faulds http://ajf.me/