Download src/php/php-src/ext/json/tests/bug68546.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 493 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/json/tests/bug68546.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/json/tests/bug68546.phpt
-
curl -L -o bug68546.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/json/tests/bug68546.phpt
493 Bytes
| --TEST-- | |
| Bug #68546 (json_decode() Fatal error: Cannot access property started with '\0') | |
| --FILE-- | |
| var_dump(json_decode('{"key": {"\u0000": "aa"}}')); | |
| var_dump(json_last_error() === JSON_ERROR_INVALID_PROPERTY_NAME); | |
| var_dump(json_decode('[{"key1": 0, "\u0000": 1}]')); | |
| var_dump(json_last_error() === JSON_ERROR_INVALID_PROPERTY_NAME); | |
| var_dump(json_last_error_msg()); | |
| echo "Done\n"; | |
| --EXPECT-- | |
| NULL | |
| bool(true) | |
| NULL | |
| bool(true) | |
| string(36) "The decoded property name is invalid" | |
| Done | |