Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86031 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19518 invoked from network); 29 Apr 2015 21:27:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Apr 2015 21:27:47 -0000 Authentication-Results: pb1.pair.com header.from=cmbecker69@gmx.de; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=cmbecker69@gmx.de; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.de designates 212.227.17.20 as permitted sender) X-PHP-List-Original-Sender: cmbecker69@gmx.de X-Host-Fingerprint: 212.227.17.20 mout.gmx.net Received: from [212.227.17.20] ([212.227.17.20:58369] helo=mout.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 37/73-26317-1DC41455 for ; Wed, 29 Apr 2015 17:27:46 -0400 Received: from [192.168.0.100] ([88.134.68.210]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0Lfolq-1Zctuj0lOk-00pKZy; Wed, 29 Apr 2015 23:27:31 +0200 Message-ID: <55414CC5.7000503@gmx.de> Date: Wed, 29 Apr 2015 23:27:33 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Yasuo Ohgaki , Ryan Pallas CC: Stanislav Malyshev , "internals@lists.php.net" References: <55401F31.9030703@gmail.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:BOXcqILIQ0I5MzoDdIM5X68VdAL10XsmyxW3jLptCEB9TL9ziqs NdezVGHJ0tTe9Pkt3W64Bm7lX6dak13rnkc+tpJycpOrFDRbZDRIy3h3mRHwQ7sPUOx74w/ kFV/4pUD07ftAcDlcGc/LfJXYYPG85iD7j15zPkbPy7YeYrJgQvCFFE4zyCrq5ogwcU4F7C +sc5ah/zXkgB0cSrwrHtg== X-UI-Out-Filterresults: notjunk:1; Subject: Re: [PHP-DEV] Adding "numeric" type hint From: cmbecker69@gmx.de (Christoph Becker) Yasuo Ohgaki wrote: > On Wed, Apr 29, 2015 at 9:33 AM, Ryan Pallas wrote: > >> I agree with Stanislav here, if you want to accept any type of number, its >> easy enough to add your own checking to do that with the wonderful >> is_numeric. And for simplicity, make an invalidArgument method that you can >> call after manually checking if arguments are wrong: *http://3v4l.org/r0qO0 >> * Works for all versions this tool runs as well. > > The issue is that weak mode type hint is *not* weak at all. It forces to > have > machine native type rather than it's data form. A solution for this issue has been proposed by the "Big Integer Support" RFC which has been withdrawn. It's too late for PHP 7.0 to re-open it, but it might be reasonable to to so for PHP 7.1. -- Christoph M. Becker