Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86033 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 22708 invoked from network); 29 Apr 2015 21:40:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Apr 2015 21:40:02 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.47 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.218.47 mail-oi0-f47.google.com Received: from [209.85.218.47] ([209.85.218.47:35270] helo=mail-oi0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 27/24-26317-1BF41455 for ; Wed, 29 Apr 2015 17:40:01 -0400 Received: by oign205 with SMTP id n205so33103610oig.2 for ; Wed, 29 Apr 2015 14:39:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=QDwoyT3m0NeLzJd3U02Y5gJiHRCA7ImjX8+acWWGPPU=; b=d9ctuFKnROOdkpKV1EZVYiT4kMPt9rV45LKDDfz4qp+tjmfmLTzj5mwkqJZ2PhoeT4 TkIfpZUjpz4nhncfHfLL3qUsn/Rm69gKV3Un88b6PvLZ6LKEvelSRiucvqCgDJBlbFKL IGslxCjhEwLrWIOaI+1jgW1jBKG7AgOIrcPvIzV1/y1+WAhPIOAWrRFRRx2gXu7Djzfm 6XHo5EQ7Sxz3GTRb6tuiIGZctUdel0Uzmh6qjYE+WM8ddOePeKKlOoVTzKgIMI+iU0NH u/n8JlCIeLuccy3mLhts4I/B0KNX5d3ip1DkTWMQ3Q6XisBLabKMQM7PZyRpErkG3ikh vOHw== X-Received: by 10.182.28.34 with SMTP id y2mr941409obg.15.1430343597918; Wed, 29 Apr 2015 14:39:57 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.202.104.196 with HTTP; Wed, 29 Apr 2015 14:39:16 -0700 (PDT) In-Reply-To: <55414CC5.7000503@gmx.de> References: <55401F31.9030703@gmail.com> <55414CC5.7000503@gmx.de> Date: Thu, 30 Apr 2015 06:39:16 +0900 X-Google-Sender-Auth: CyFucJ78KmpFvvg5hxXXUB6eGVM Message-ID: To: Christoph Becker Cc: Ryan Pallas , Stanislav Malyshev , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=089e0158ae880f8fbb0514e3d20e Subject: Re: [PHP-DEV] Adding "numeric" type hint From: yohgaki@ohgaki.net (Yasuo Ohgaki) --089e0158ae880f8fbb0514e3d20e Content-Type: text/plain; charset=UTF-8 Hi Christoph, On Thu, Apr 30, 2015 at 6:27 AM, Christoph Becker 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. I don't think breaking a lot of code under 32 bit machines with PHP 7.0 is not good thing to do. In addition, current code does not even allow GMP object as "int". http://3v4l.org/GiklL Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --089e0158ae880f8fbb0514e3d20e--