小编crt*_*hrd的帖子

带有变量的 PHP7 UTF-8 代码点转义序列

PHP 7 引入了Unicode 代码点转义语法,它非常易于使用,但我无法将其用作代码点变量。

echo "\u{1f602}"; // echoes 

$em = "1f602";
echo sprintf("\u{%x}", $em); // returns error "Invalid UTF-8 codepoint escape sequence"
Run Code Online (Sandbox Code Playgroud)

我究竟做错了什么 ?

php variables unicode escaping sequence

5
推荐指数
0
解决办法
583
查看次数

标签 统计

escaping ×1

php ×1

sequence ×1

unicode ×1

variables ×1