1--TEST--
2Valid Unicode escape sequences: Surrogate halves
3--FILE--
4<?php
5
6// Surrogate pairs are non-well-formed UTF-8 - however, it is sometimes useful
7// to be able to produce these (e.g. CESU-8 handling)
8
9var_dump(bin2hex("\u{D801}"));
10var_dump(bin2hex("\u{DC00}"));
11var_dump(bin2hex("\u{D801}\u{DC00}")); // CESU-8 encoding of U+10400
12--EXPECT--
13string(6) "eda081"
14string(6) "edb080"
15string(12) "eda081edb080"
16