Download src/php/php-src/ext/json/tests/bug41067.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 458 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/json/tests/bug41067.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/json/tests/bug41067.phpt
-
curl -L -o bug41067.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/json/tests/bug41067.phpt
458 Bytes
| --TEST-- | |
| Bug #41067 (json_encode() problem with UTF-16 input) | |
| --FILE-- | |
| $single_barline = "\360\235\204\200"; | |
| $array = array($single_barline); | |
| print bin2hex($single_barline) . "\n"; | |
| // print $single_barline . "\n\n"; | |
| $json = json_encode($array); | |
| print $json . "\n\n"; | |
| $json_decoded = json_decode($json, true); | |
| // print $json_decoded[0] . "\n"; | |
| print bin2hex($json_decoded[0]) . "\n"; | |
| print "END\n"; | |
| --EXPECT-- | |
| f09d8480 | |
| ["\ud834\udd00"] | |
| f09d8480 | |
| END | |