<?php $str = "\ud83d\ude01"; $str = json_decode('"' . $str . '"'); $bytes = str_split($str); for ($i = 0; $i < count($bytes); $i++) { $bytes[$i] = "\x" . dechex(ord($bytes[$i])); } $str = implode('',$bytes); echo $str;
You have javascript disabled. You will not be able to edit any code.