3v4l.org

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

preferences:
41.48 ms | 402 KiB | 5 Q