Bug #66646 [Opn]: $array[BIG_DIGITS_STRING]
| From: | wmtrader at yandex dot ru | Date: | Wed, 05 Feb 2014 12:49:31 +0000 |
| Subject: | Bug #66646 [Opn]: $array[BIG_DIGITS_STRING] | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-184162@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=66646&edit=1
ID: 66646
User updated by: wmtrader at yandex dot ru
Reported by: wmtrader at yandex dot ru
Summary: $array[BIG_DIGITS_STRING]
Status: Open
Type: Bug
Package: Arrays related
Operating System: centos 6.5
-PHP Version: 5.4.24
+PHP Version: 5.3.0-5.3.3
Block user comment: N
Private report: N
New Comment:
Problem is actual only for versions 5.3.0-5.3.3
Previous Comments:
------------------------------------------------------------------------
[2014-02-05 12:38:05] vovan-ve at yandex dot ru
Test code works fine in PHP/5.3.10 x64.
Sandbox http://sandbox.onlinephpfunctions.com/
sais, that is also works fine in 5.4.21 and 5.5.5
------------------------------------------------------------------------
[2014-02-05 08:01:02] wmtrader at yandex dot ru
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 this bug report at https://bugs.php.net/bug.php?id=66646&edit=1