Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81944 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27754 invoked from network); 5 Feb 2015 16:25:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Feb 2015 16:25:14 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.178 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.178 mail-wi0-f178.google.com Received: from [209.85.212.178] ([209.85.212.178:59483] helo=mail-wi0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C8/F3-27691-86993D45 for ; Thu, 05 Feb 2015 11:25:12 -0500 Received: by mail-wi0-f178.google.com with SMTP id bs8so11690522wib.5 for ; Thu, 05 Feb 2015 08:25:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=APzae7mTMcinrSIOj12vgymNRfSw7MTtRTMuE6Yn7Xk=; b=rh9ao9T0oEnapsiloL2aBNvO4y+nGQBxSUb5BbwWW8T48NshPomeYrZO4f6NIxPqlP gsD29uOjUYVuHa4BVAA2hcw6zaly6czsXAEwOtFJJxISCo9cpqnOtM1c8XAscCM6hlTt +7wcE5V22+9RaZqY+HPQv6q3xjbBI0kgQF9CiwW8xFLp3/SkIQd1yv8gBCy1SlNlvxMj j3XeXfveVLHMg2XzOClkNBpiPXOINbUD6K+yyviAN1Tk7PdSYR01UXiMC43Rlf2D9G+g FqQ9NbbevlNSM6k/toCD6mA+txisBIQxrC9VElwFxcAAKAxSvCJflFpj/hhkgTayAj2b pnaw== X-Received: by 10.180.206.66 with SMTP id lm2mr23118012wic.38.1423153509052; Thu, 05 Feb 2015 08:25:09 -0800 (PST) Received: from [192.168.0.172] ([62.189.198.114]) by mx.google.com with ESMTPSA id n1sm26625356wib.11.2015.02.05.08.25.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Feb 2015 08:25:08 -0800 (PST) Message-ID: <54D3995B.4050308@gmail.com> Date: Thu, 05 Feb 2015 16:24:59 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: PHP Internals References: <54D34CD6.6020401@lsces.co.uk> <585A6531-BFF1-4B40-9052-518518A9409F@ajf.me> <54D36322.8080805@lsces.co.uk> <54D372CD.5070007@gmail.com> <54D377AF.9030009@gmx.de> <54D37D09.6050803@gmail.com> <54D38380.2060509@lsces.co.uk> In-Reply-To: <54D38380.2060509@lsces.co.uk> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] hints and constraints From: rowan.collins@gmail.com (Rowan Collins) Lester Caine wrote on 05/02/2015 14:51: > On 05/02/15 14:24, Rowan Collins wrote: >>>> There is nothing new about PHP's userland int type being 64-bit on >>>> 64-bit platforms. For instance, raising 2 to the power of 62 returns >>>> exactly the same thing on every version of PHP back to 4.3.0: >>>> http://3v4l.org/VBMbv >>> Unfortunately, that's not true for Windows, see >>> : >>> >>> | The x64 builds of PHP for Windows should be considered experimental, >>> | and do not yet provide 64-bit integer or large file support. Please >>> | see this post for work ongoing to improve these builds. >>> >> Yes, the picture on Windows is rather different, hence my second comment >> that most production builds of PHP are probably on (64-bit) Linux. >> >> The point is that writing code in PHP and assuming integers will >> overflow after 32 bits has been a bad idea for a long time, outside of >> really unusual cases like COM integration [1], where there's a valid >> reason to assume you'll never want to run it on Linux. >> >> [1] http://php.net/manual/en/book.com.php > This is all past history ... > Those of us who have had to support windows only sites in the past have > often run 32 bit builds of Linux simply to maintain some level of > compatibility. It is the growing switch to 64bit builds of PHP5 that are > highlight many of the problems that we NOW want to fix things for which > wrong decisions in the past are catching up with us. Overflowing to > float had good reason for some users but not for others and now is the > time to sort out the whole mess. That sounds like a pretty good argument in favour of Andrea's RFC to me. > The simple answer here is that there is not a 'single' definition of > integer ... True. But the definition of "integer" in PHP is, and has been for many years, "as big as this build can handle". With Andrea's patch, all systems can handle really really big integers, which seems like a big win to me. Regards, -- Rowan Collins [IMSoP]