3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $s = strtr("This is á tèst!", "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûýýþÿŔŕ", "aaaaaaaceeeeiiiidnoooooouuuuybsaaaaaaaceeeeiiiidnoooooouuuyybyRr"); $s = trim($s); $s = str_replace (" ", "-", $s); $s = preg_replace('/[^a-zA-Z0-9-]/', '', $s); $s = strtolower($s); print_r($s);
Output for 4.3.0 - 7.1.0
this-is-r-trst