3v4l.org

run code in 300+ PHP versions simultaneously
<?php setlocale(LC_ALL, 'fr_FR'); $text = "Test êéest"; $text = preg_replace('~[^\\pL\d]+~u', '-', $text); $text = trim($text, '-'); $text = iconv('UTF-8','ASCII//TRANSLIT', $text); $text = strtoupper($text); echo $text;

preferences:
39.79 ms | 402 KiB | 5 Q