Download src/php/php-src/ext/json/tests/bug73991.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/bug73991.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/json/tests/bug73991.phpt
-
curl -L -o bug73991.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/json/tests/bug73991.phpt
493 Bytes
| --TEST-- | |
| Allow JSON_OBJECT_AS_ARRAY to have an effect | |
| --FILE-- | |
| $json = '{"foo":"bar"}'; | |
| var_dump(json_decode($json, false)); | |
| var_dump(json_decode($json, true)); | |
| var_dump(json_decode($json, null, 512, 0)); | |
| var_dump(json_decode($json, null, 512, JSON_OBJECT_AS_ARRAY)); | |
| --EXPECTF-- | |
| object(stdClass)#%d (1) { | |
| ["foo"]=> | |
| string(3) "bar" | |
| } | |
| array(1) { | |
| ["foo"]=> | |
| string(3) "bar" | |
| } | |
| object(stdClass)#%d (1) { | |
| ["foo"]=> | |
| string(3) "bar" | |
| } | |
| array(1) { | |
| ["foo"]=> | |
| string(3) "bar" | |
| } | |