Bug #66646 [NEW]: $array[BIG_DIGITS_STRING]

From: Date: Wed, 05 Feb 2014 08:01:03 +0000
Subject: Bug #66646 [NEW]: $array[BIG_DIGITS_STRING]
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-184158@lists.php.net to get a copy of this message
From: wmtrader at yandex dot ru Operating system: centos 6.5 PHP version: 5.4.24 Package: Arrays related Bug Type: Bug Bug description:$array[BIG_DIGITS_STRING] Description: ------------ Error converting data type. Test script: --------------- <?php $m = range(85,110); foreach($m as $val){ $key = $val."00000000000000000"; $a[$key] = $key; } print_r($a); $b["9900000000000000000"]="1"; print_r($b); ?> Expected result: ---------------- Array ( [8500000000000000000] => 8500000000000000000 [8600000000000000000] => 8600000000000000000 [8700000000000000000] => 8700000000000000000 [8800000000000000000] => 8800000000000000000 [8900000000000000000] => 8900000000000000000 [9000000000000000000] => 9000000000000000000 [9100000000000000000] => 9100000000000000000 [9200000000000000000] => 9200000000000000000 [9300000000000000000] => 9300000000000000000 [9400000000000000000] => 9400000000000000000 [9500000000000000000] => 9500000000000000000 [9600000000000000000] => 9600000000000000000 [9700000000000000000] => 9700000000000000000 [9800000000000000000] => 9800000000000000000 [9900000000000000000] => 9900000000000000000 [10000000000000000000] => 10000000000000000000 [10100000000000000000] => 10100000000000000000 [10200000000000000000] => 10200000000000000000 [10300000000000000000] => 10300000000000000000 [10400000000000000000] => 10400000000000000000 [10500000000000000000] => 10500000000000000000 [10600000000000000000] => 10600000000000000000 [10700000000000000000] => 10700000000000000000 [10800000000000000000] => 10800000000000000000 [10900000000000000000] => 10900000000000000000 [11000000000000000000] => 11000000000000000000 ) Array ( [9900000000000000000] => 1 ) Actual result: -------------- Array ( [8500000000000000000] => 8500000000000000000 [8600000000000000000] => 8600000000000000000 [8700000000000000000] => 8700000000000000000 [8800000000000000000] => 8800000000000000000 [8900000000000000000] => 8900000000000000000 [9000000000000000000] => 9000000000000000000 [9100000000000000000] => 9100000000000000000 [9200000000000000000] => 9200000000000000000 [-9146744073709551616] => 9300000000000000000 [-9046744073709551616] => 9400000000000000000 [-8946744073709551616] => 9500000000000000000 [-8846744073709551616] => 9600000000000000000 [-8746744073709551616] => 9700000000000000000 [-8646744073709551616] => 9800000000000000000 [-8546744073709551616] => 9900000000000000000 [10000000000000000000] => 10000000000000000000 [10100000000000000000] => 10100000000000000000 [10200000000000000000] => 10200000000000000000 [10300000000000000000] => 10300000000000000000 [10400000000000000000] => 10400000000000000000 [10500000000000000000] => 10500000000000000000 [10600000000000000000] => 10600000000000000000 [10700000000000000000] => 10700000000000000000 [10800000000000000000] => 10800000000000000000 [10900000000000000000] => 10900000000000000000 [11000000000000000000] => 11000000000000000000 ) Array ( [-8546744073709551616] => 1 ) -- Edit bug report at https://bugs.php.net/bug.php?id=66646&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=66646&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=66646&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=66646&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=66646&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=66646&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=66646&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=66646&r=needscript Try newer version: https://bugs.php.net/fix.php?id=66646&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=66646&r=support Expected behavior: https://bugs.php.net/fix.php?id=66646&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=66646&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=66646&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=66646&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=66646&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=66646&r=dst IIS Stability: https://bugs.php.net/fix.php?id=66646&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=66646&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=66646&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=66646&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=66646&r=mysqlcfg

« previous php.bugs (#184158) next »