Download src/php/php-src/ext/json/tests/bug40503.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 439 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/json/tests/bug40503.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/json/tests/bug40503.phpt
-
curl -L -o bug40503.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/json/tests/bug40503.phpt
439 Bytes
| --TEST-- | |
| Bug #40503 (json_encode() value corruption on 32bit systems with overflown values) | |
| --INI-- | |
| serialize_precision=-1 | |
| --FILE-- | |
| function json_test_show_eq($x, $y) { | |
| echo "$x ". ( $x == $y ? "==" : "!=") ." $y\n"; | |
| } | |
| $value = 0x7FFFFFFF; #2147483647; | |
| json_test_show_eq("$value", json_encode($value)); | |
| $value++; | |
| json_test_show_eq("$value", json_encode($value)); | |
| --EXPECT-- | |
| 2147483647 == 2147483647 | |
| 2147483648 == 2147483648 | |