Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71465 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4888 invoked from network); 23 Jan 2014 20:36:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jan 2014 20:36:24 -0000 Authentication-Results: pb1.pair.com smtp.mail=christopher.jones@oracle.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=christopher.jones@oracle.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain oracle.com designates 156.151.31.81 as permitted sender) X-PHP-List-Original-Sender: christopher.jones@oracle.com X-Host-Fingerprint: 156.151.31.81 userp1040.oracle.com Received: from [156.151.31.81] ([156.151.31.81:35276] helo=userp1040.oracle.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D3/5D-39789-54D71E25 for ; Thu, 23 Jan 2014 15:36:23 -0500 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s0NKaIoK031837 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 23 Jan 2014 20:36:18 GMT Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s0NKaH3M003466 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Thu, 23 Jan 2014 20:36:18 GMT Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s0NKaHhS003453 for ; Thu, 23 Jan 2014 20:36:17 GMT Received: from [130.35.70.190] (/130.35.70.190) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 23 Jan 2014 12:36:16 -0800 Message-ID: <52E17D40.8090001@oracle.com> Date: Thu, 23 Jan 2014 12:36:16 -0800 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: internals@lists.php.net References: <52E0F55F.4040802@lsces.co.uk> <2490044a0e2cba88044cf5da9b1b6647.squirrel@webmail.klapt.com> In-Reply-To: <2490044a0e2cba88044cf5da9b1b6647.squirrel@webmail.klapt.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Source-IP: ucsinet21.oracle.com [156.151.31.93] Subject: Re: [PHP-DEV] [RFC] 64 bit platform improvements for string length and integer From: christopher.jones@oracle.com (Christopher Jones) On 01/23/2014 09:52 AM, Anatol Belski wrote: > Hi Nikita, > > On Thu, January 23, 2014 15:29, Nikita Popov wrote: >> If this patch is included in PHP 5.6 I think it is very likely that many >> extensions will not be updated or take a long while in updating. It's one >> thing to add two or three new ifdefs to support a new PHP release and >> something entirely else to change virtually all types in your code and >> verify that it is still safe with the new sizes. > I think it depends on how active an extension is supported and developed. > For instance on PECL are still some extensions not even been ported to > PHP5. From the todays experience, a port to the current patch might take > from 3 hours to 3 days, depending on complexity. Say 3 days vs 5 months > until final, together with the porting docs and tools, most of the really > active and being in demand extensions will be so far or users will tear > the devs apart :) It will take time for extensions to catch up, regardless of which release the 64 bit changes are merged. This will have a short or medium term negative effect on PHP but I believe the type cleanup is an overall step forward. I recall the 5.4 changes took some time to filter down to various extensions, and also took effort from people who were not the current maintainers. The 64 bit project should attempt to minimize the scope of code changes needed, and be released when suitable user and extension maintainer expectations have been set. For reference, here is Anatol's mapping that allows extensions using the new types etc to compile with older PHP releases: https://github.com/php/php-src/blob/str_size_and_int64/compat/compat.h I would have leaned towards not requiring macro name changes, but I wouldn't vote against the RFC because of them. The current extension migration process is: - change the code to the new types and macros - update ssprintf formats - update ZPP formats - review and update any signed<->unsigned comparisons - review and update library type casts, range checks etc To allow the extension to also build with older PHP versions then: - compat.h is required - some #ifdefs are needed, e.g. for ZPP. Chris -- christopher.jones@oracle.com http://twitter.com/ghrd Free PHP & Oracle book: http://www.oracle.com/technetwork/topics/php/underground-php-oracle-manual-098250.html