Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:74336 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 49018 invoked from network); 18 May 2014 10:13:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 May 2014 10:13:13 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.178 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.216.178 mail-qc0-f178.google.com Received: from [209.85.216.178] ([209.85.216.178:33730] helo=mail-qc0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D0/85-12623-6B788735 for ; Sun, 18 May 2014 06:13:12 -0400 Received: by mail-qc0-f178.google.com with SMTP id l6so7082979qcy.37 for ; Sun, 18 May 2014 03:13:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=xjwwtF7r6XqOqxQarCTqIbOaedakFLjPkF3CbThJkZ8=; b=ryqYf8gpohb6gEH2wPbz3SdzFsJaL172yD3bD4mTSHFn4u78EqsqtSjb4sH94xTFL6 H98hnoN9xRfvw0ovrxMElbRSzHGW8k8dcGwrDyVWR/enu3Jz2Fw/NJJxHcP4GnnmYiG5 H78XPtCMLVTRu+uwGfefmuVKN6YamfMC9s9SczyND9R9AVOqE2sqWy6bszldHwYFy0k7 KpyglBEp59DcQdybfZ7FJaDLulhQtDrFwVaBYN3NCHIpcU00B8mN1Ds9j2WHhTHqyHiq qV0zcWhNKEcBrQVo+H8auYum1dTyRzDsuKzZ8NB5+zgfxdhi8Uo2BzzUnePimqx0Fk5Q mWTQ== MIME-Version: 1.0 X-Received: by 10.224.80.138 with SMTP id t10mr38655832qak.0.1400407988318; Sun, 18 May 2014 03:13:08 -0700 (PDT) Received: by 10.140.47.231 with HTTP; Sun, 18 May 2014 03:13:08 -0700 (PDT) In-Reply-To: <53788337.9090006@lerdorf.com> References: <53788337.9090006@lerdorf.com> Date: Sun, 18 May 2014 12:13:08 +0200 Message-ID: To: Rasmus Lerdorf Cc: Nikita Popov , PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Rethinking 64bit sizes and PHP-NG From: pierre.php@gmail.com (Pierre Joye) On Sun, May 18, 2014 at 11:53 AM, Rasmus Lerdorf wrote: > On 05/17/2014 08:27 PM, Nikita Popov wrote: >> So, that's my opinion on how we should proceed with the 64bit patch. I very >> much hope that we can reach some consensus about this. > > Thanks for pulling this together Nikita. People have been asking me > about this issue and this was exactly what I told them we would likely > end up with as it is a sane and reasonable implementation of the two > efforts. I would guess an rfc vote between the alternatives, as I see > them, would favour this one by a wide margin. It is exactly what we have been advocating during the whole process. More about that in a mail I'm writing. > As for >4G strings, it does seem unlikely, on current hardware, that you > would stick that much data in a variable. You might be able to get one > in there, but if you then do anything with it, the tmp copy is going to > make things fall over pretty quickly. But who knows in 4-5 years maybe > having a TB of ram in servers will be the norm, IO channels have become > much wider and we are manipulating 4K video files directly in PHP so > perhaps you can make a future-proofing argument there. The string length is a side effect, not a goal per se, never was. But variables, buffers dealing with external libraries or functions are sensible areas. A safe implementation will prevent many issues we already had, many times. Also correct typing and less (if not none) magic casting guessed by the compiler will also drastically increase PHP code quality and safety. These two points, and 64bit integer in a portable manner, are the top goals of this RFC. Cheers, -- Pierre @pierrejoye | http://www.libgd.org