3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "Henrik Ibsen, Henrik Ibsen \u02c8h\u025bn\u027eik \u02c8ips\u0259n (Skien, 20 marzo 1828 - Oslo, 23 maggio 1906) รจ stato uno scrittore, drammaturgo, poeta e regista teatrale norvegese."; $utf8html = preg_replace('@\\\U([0-9A-F]{4})@i', "&#x\\1", $str); echo $utf8html;

preferences:
46.07 ms | 402 KiB | 5 Q