Bug #52899 [Opn->Csd]: Incorrect array key cast (string to integer) when key > PHP_INT_MAX

From: Date: Fri, 24 Sep 2010 07:09:35 +0000
Subject: Bug #52899 [Opn->Csd]: Incorrect array key cast (string to integer) when key > PHP_INT_MAX
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-154608@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=52899&edit=1 ID: 52899 User updated by: thorn at slonik dot sk Reported by: thorn at slonik dot sk Summary: Incorrect array key cast (string to integer) when key > PHP_INT_MAX -Status: Open +Status: Closed Type: Bug Package: Scripting Engine problem Operating System: Linux 32-bit PHP Version: 5.2.14 Block user comment: N New Comment: Since you cannot reproduce it and I don't have access to other 32-bit machine with linux & php I close this bug. I'd conclude with: It seems to be gentoo specific bug. Even though they could not help as of yet. :( Previous Comments: ------------------------------------------------------------------------ [2010-09-22 13:28:05] thorn at slonik dot sk I tried 5.3.3 but the results are same as with 5.2.14. ------------------------------------------------------------------------ [2010-09-22 09:08:58] thorn at slonik dot sk I opened a gentoo bug: http://bugs.gentoo.org/show_bug.cgi?id=338280 I tried my test script on same machine with windows and it works correctly. I'm compiling 5.3.3 now to see if it's any different. Will post results later. ------------------------------------------------------------------------ [2010-09-21 17:41:42] cataphract@php.net Can you try with a vanilla version of PHP 5.2.14? By inspection, I don't see how this can happen. Most likely it's due to a Gentoo patch. ------------------------------------------------------------------------ [2010-09-21 15:54:45] thorn at slonik dot sk I'm using gentoo linux (no distro binaries) $ php -v PHP 5.2.14-pl0-gentoo (cli) (built: Sep 17 2010 12:47:23) Copyright (c) 1997-2010 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies $ uname -a Linux gloriosa 2.6.35-tuxonice-r1 #1 SMP Wed Sep 1 08:59:13 CEST 2010 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz GenuineIntel GNU/Linux ------------------------------------------------------------------------ [2010-09-21 13:54:53] cataphract@php.net Can you give more details about your system? Are you using distro binaries? I can't reproduce this: root@router:~# php <?php $array['2147483648'] = 3; var_dump($array); var_dump(PHP_INT_MAX); array(1) { ["2147483648"]=> int(3) } int(2147483647) root@router:~# php -v PHP 5.2.14 (cli) (built: Aug 18 2010 17:16:15) Copyright (c) 1997-2010 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies root@router:~# uname -a Linux router 2.4.36 #340 Sun Jul 27 20:07:55 CEST 2008 mips unknown ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/bug.php?id=52899 -- Edit this bug report at http://bugs.php.net/bug.php?id=52899&edit=1

« previous php.bugs (#154608) next »