Download src/php/php-src/ext/json/tests/009.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 252 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/json/tests/009.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/json/tests/009.phpt
-
curl -L -o 009.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/json/tests/009.phpt
252 Bytes
| --TEST-- | |
| json_encode() with non-packed array that should be encoded as an array rather than object | |
| --FILE-- | |
| $a = array(1, 2, 3, 'foo' => 'bar'); | |
| unset($a['foo']); | |
| var_dump(json_encode($a)); | |
| echo "Done\n"; | |
| --EXPECT-- | |
| string(7) "[1,2,3]" | |
| Done | |