Download src/php/php-src/tests/lang/string/unicode_escape_surrogates.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 417 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/tests/lang/string/unicode_escape_surrogates.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/tests/lang/string/unicode_escape_surrogates.phpt
-
curl -L -o unicode_escape_surrogates.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/tests/lang/string/unicode_escape_surrogates.phpt
417 Bytes
| --TEST-- | |
| Valid Unicode escape sequences: Surrogate halves | |
| --FILE-- | |
| // Surrogate pairs are non-well-formed UTF-8 - however, it is sometimes useful | |
| // to be able to produce these (e.g. CESU-8 handling) | |
| var_dump(bin2hex("\u{D801}")); | |
| var_dump(bin2hex("\u{DC00}")); | |
| var_dump(bin2hex("\u{D801}\u{DC00}")); // CESU-8 encoding of U+10400 | |
| --EXPECT-- | |
| string(6) "eda081" | |
| string(6) "edb080" | |
| string(12) "eda081edb080" | |