Re: [VOTE] [RFC] 64 bit platform improvements for string length and integer

From: Date: Wed, 14 May 2014 17:10:54 +0000
Subject: Re: [VOTE] [RFC] 64 bit platform improvements for string length and integer
References: 1 2 3 4 5 6 7 8  Groups: php.internals 
Request: Send a blank email to internals+get-74195@lists.php.net to get a copy of this message
On 14.05.2014 11:57, Andrea Faulds wrote:
On 14 May 2014, at 09:53, Dmitry Stogov <dmitry@zend.com> wrote:
PHP supports 64bit for ages, and this proposal has nothing common with 64bit support in general. It allows 2GB strings, but do you imagine a web application that need them? However, each big PHP site will have to "pay" for it.
FWIW, it does concern general 64-bit support. It makes PHP act consistently across all 64-bit platforms. Also, switching to size_t for string length does not just mean ‘2GB strings’. It means using the right tool for the job. Even the C standard library uses size_t for string length!
This is purely academical. And the standard library has to support everything, it's the standard library. PHP is on its own, and if an addition is of little use to the most of the developers/scripts, why the heck it should be in/the default. A good solution is to typedef a php_size_t, leave it to uint32_t and for those, who need more than 4GB in strings and elements they can just build with size_t as definition. Offer the choice, don't force. Andrey
-- Andrea Faulds http://ajf.me/


« previous php.internals (#74195) next »