Download src/php/php-src/ext/json/tests/bug66025.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 316 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/json/tests/bug66025.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/json/tests/bug66025.phpt
-
curl -L -o bug66025.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/json/tests/bug66025.phpt
316 Bytes
| --TEST-- | |
| Bug #66025 (Indent wrong when json_encode() called from jsonSerialize function) | |
| --FILE-- | |
| class Foo implements JsonSerializable { | |
| public function jsonSerialize(): mixed { | |
| return json_encode([1], JSON_PRETTY_PRINT); | |
| } | |
| } | |
| echo json_encode([new Foo]), "\n"; | |
| --EXPECT-- | |
| ["[\n 1\n]"] | |