3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = " muito bom parabéns 😤 AND r0_.avaliacao = 'Parabéns 😤' "; $str_encoding = mb_detect_encoding($str, 'auto'); $str_name = iconv($str_encoding, 'UTF-8', $str); $str_name = preg_replace('/[^\p{L}\p{N}\s]\w/u', '', $str); $str_name = preg_replace('/\xE0[\x80-\x9F][\x80-\xBF]'. '|\xED[\xA0-\xBF][\x80-\xBF]/S','?', $str ); print($str_name);

preferences:
61.17 ms | 402 KiB | 5 Q