Download src/php/php-src/ext/json/tests/bug47644.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 576 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/json/tests/bug47644.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/json/tests/bug47644.phpt
-
curl -L -o bug47644.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/json/tests/bug47644.phpt
576 Bytes
| --TEST-- | |
| Bug #47644 (valid large integers are truncated) | |
| --SKIPIF-- | |
| if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); | |
| --FILE-- | |
| 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 | |