3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'Ruka'; # Make sure string is in UTF-8 and strip invalid UTF-8 characters $str = mb_convert_encoding($str, 'UTF-8', mb_list_encodings()); print_r($str);

preferences:
43.96 ms | 402 KiB | 5 Q