3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '\u00c3\u0096sterreich'; $str = preg_replace_callback('/\\\\u([0-9a-fA-F]{4})/', function ($match) { return utf8_decode(mb_convert_encoding(pack('H*', $match[1]), 'UTF-8', 'UCS-2BE')); }, $str); print_r( $str);

preferences:
24.38 ms | 408 KiB | 5 Q