#46701 [Opn->Ver]: assoc array index keys converted wrong in 32bit systems

From: Date: Fri, 28 Nov 2008 13:34:17 +0000
Subject: #46701 [Opn->Ver]: assoc array index keys converted wrong in 32bit systems
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-131445@lists.php.net to get a copy of this message
ID: 46701 Updated by: jani@php.net -Summary: Incorrect array data, but works correctly on Windows version Reported By: testuzer at hotmail dot com -Status: Open +Status: Verified Bug Type: Arrays related Operating System: Linux - ubuntu PHP Version: 5.2.6 Previous Comments: ------------------------------------------------------------------------ [2008-11-28 12:37:40] jani@php.net Same result with 32bit linux, this is with 64bit: # php t.php Array ( [3428599296] => 1 [3459455488] => 1 [3459616768] => 1 ) ------------------------------------------------------------------------ [2008-11-27 21:04:17] testuzer at hotmail dot com Description: ------------ Creating associative array with long values in the key fails under linux builds but work under windows. Reproduce code: --------------- $test_array = array( 0xcc5c4600 => 1, 0xce331a00 => 1, 0xce359000 => 1, ); print_r( $test_array ); Expected result: ---------------- Array ( [-866368000] => 1 [-835511808] => 1 [-835350528] => 1 ) Actual result: -------------- Array ( [-2147483648] => 1 ) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=46701&edit=1

« previous php.bugs (#131445) next »