Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76082 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82470 invoked from network); 24 Jul 2014 23:48:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jul 2014 23:48:31 -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.207 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.207 imap2-2.ox.privateemail.com Received: from [192.64.116.207] ([192.64.116.207:53922] helo=imap2-2.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 74/37-55539-E4B91D35 for ; Thu, 24 Jul 2014 19:48:31 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 002768C0081; Thu, 24 Jul 2014 19:48:32 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at imap2.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap2.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id auOElE5rA69a; Thu, 24 Jul 2014 19:48:32 -0400 (EDT) Received: from [192.168.0.15] (unknown [90.210.122.167]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id DF1238C007D; Thu, 24 Jul 2014 19:48:31 -0400 (EDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) In-Reply-To: <53C02C31-BE27-4235-AF25-AE319067FD94@ajf.me> Date: Fri, 25 Jul 2014 00:48:28 +0100 Cc: "internals@lists.php.net >> PHP Internals" Content-Transfer-Encoding: quoted-printable Message-ID: <4617E9BB-754D-425F-BBBD-636925B3B630@ajf.me> References: <08503591-EFC8-48E6-984E-FFC292C5EA5F@ajf.me> <53C2178E.7070705@sugarcrm.com> <53CB70BC.4020001@php.net> <53CC0A75.6010200@sugarcrm.com> <7E1578C5-30DE-46CE-B3CA-AFA9F7FA1B6B@thesba.com> <53C02C31-BE27-4235-AF25-AE319067FD94@ajf.me> To: Robert Williams X-Mailer: Apple Mail (2.1878.6) Subject: Re: [PHP-DEV] [RFC] Scalar Type Hinting With Casts (re-opening) From: ajf@ajf.me (Andrea Faulds) On 23 Jul 2014, at 19:37, Andrea Faulds wrote: >=20 > On 23 Jul 2014, at 19:21, Robert Williams = wrote: >=20 >> Also, do int, float, and numeric accept numbers in octal, hex, = scientific notation, etc.? I don=92t believe there are any examples in = the RFC that intentionally or accidentally show what happens with, say, = 0x2f as a value. >=20 > Ooh, you=92ve caught me out there. The patch as it stands would permit = such non-decimal numbers, which isn=92t what it should do as = convert_to_long_base_safe should actually permit only the specified = base. >=20 > So, yes it does permit non-decimal numbers, but it=92s a bug I need to = fix. Said bug has been fixed in the proposed patch now. =930xa=94 is no = longer valid for int, float or numeric. It never should=92ve been valid, = but the implementation of convert_to_(long_base|double|numeric)_safe was = incorrect. -- Andrea Faulds http://ajf.me/