PHP 7 引入了Unicode 代码点转义语法,它非常易于使用,但我无法将其用作代码点变量。
echo "\u{1f602}"; // echoes $em = "1f602"; echo sprintf("\u{%x}", $em); // returns error "Invalid UTF-8 codepoint escape sequence"
我究竟做错了什么 ?
php variables unicode escaping sequence
escaping ×1
php ×1
sequence ×1
unicode ×1
variables ×1