3v4l.org

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