blob: 85c4858af541ec7c1707c30dc15e1513f9613848 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
--TEST--
Bug #47644 (valid large integers are truncated)
--SKIPIF--
<?php
if (!extension_loaded('json')) die('skip');
if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
?>
--FILE--
<?php
for ($i = 10000000000000000; $i < 10000000000000006; $i++) {
var_dump(json_decode("[$i]"));
}
echo "Done\n";
?>
--EXPECT--
array(1) {
[0]=>
int(10000000000000000)
}
array(1) {
[0]=>
int(10000000000000001)
}
array(1) {
[0]=>
int(10000000000000002)
}
array(1) {
[0]=>
int(10000000000000003)
}
array(1) {
[0]=>
int(10000000000000004)
}
array(1) {
[0]=>
int(10000000000000005)
}
Done
|