Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:43419 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 99102 invoked from network); 19 Mar 2009 20:25:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Mar 2009 20:25:53 -0000 Authentication-Results: pb1.pair.com smtp.mail=php_lists@realplain.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=php_lists@realplain.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain realplain.com from 209.151.69.1 cause and error) X-PHP-List-Original-Sender: php_lists@realplain.com X-Host-Fingerprint: 209.151.69.1 liberty.vosn.net Linux 2.4/2.6 Received: from [209.151.69.1] ([209.151.69.1:50416] helo=liberty.vosn.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 40/BC-55398-F4AA2C94 for ; Thu, 19 Mar 2009 15:25:52 -0500 Received: from 72-161-148-24.dyn.centurytel.net ([72.161.148.24]:51632 helo=pc1) by liberty.vosn.net with smtp (Exim 4.69) (envelope-from ) id 1LkOoD-0002E4-NJ; Thu, 19 Mar 2009 14:25:45 -0600 Message-ID: <5FCCF5B726CC4366BD5EB73D373C6742@pc1> To: , "Rasmus Lerdorf" Cc: "Dmitry Stogov" , "Lukas Kahwe Smith" , =?iso-8859-1?Q?Johannes_Schl=FCter?= References: <1113CE12226949C2939A31971420991F@pc1> <49C0A7C7.8000804@zend.com> <12E613FAA1C9422B948F00B61AD32366@pc1> <49C134E5.7020706@zend.com> <49C29EEF.9010702@lerdorf.com> Date: Thu, 19 Mar 2009 15:25:43 -0500 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5512 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - liberty.vosn.net X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - realplain.com Subject: Re: [PHP-DEV] Re: [PATCH] Bug #45877: LONG_MAX/MIN array key as string/int From: php_lists@realplain.com ("Matt Wilmas") Hi Rasmus, ----- Original Message ----- From: "Rasmus Lerdorf" Sent: Thursday, March 19, 2009 > So, what is the final conclusion on this one? Are we at a combination > of Matt's and Dmitry's patches here? > > I think we definitely need to fix this even in the 5.2 branch and get it > back to 5.1.x and earlier behavior. I consider it a bug that: > > $arr[3500000000] = 'blah'; > print_r($arr); > > results in: > > [-2147483648] => blah > > if someone has written brand new 5.2-specific code that relies on this > weird behavior, then we will just have to bite the bullet and break that > code. It is way more likely that people are relying on the earlier > behavior and will end up with subtle problems in 5.2. I just had > someone at Yahoo get bitten by this when they upgraded from 5.1.x to > 5.2.x. This thread is about conversion of *numeric string* keys to int/long, rather than double conversion in your example. Bug #45877's behavior has been around forever I think until the fix a couple days ago (5.2 hasn't been changed). With the conversion behavior you're talking about, it sounds like you want the "double to long conversion change" thread. [1] :-) A change was made there over a year ago in 5.3+, and I've been wondering about what should be expected and how to make that expected behavior consistent across platforms. All details are in that message or the linked ones. However, nothing has been changed in a 5.2.x release (there was some partial backport shortly before getting reverted). If you noticed a change in 5.2.x, perhaps it was platform related? [1] http://marc.info/?l=php-internals&m=123704111325725&w=2 > -Rasmus - Matt