3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $cnStr = "中"; //utf8的中文 //unicode $code = unpack("H6codes", $cnStr); var_dump($code); //汉字 $cnStr = pack("H6", $code['codes']); echo $cnStr;
Output for 4.3.0 - 7.1.0
array(1) { ["codes"]=> string(6) "e4b8ad" } 中