3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $value = 'aböd%&/-cd#Ä'; $value = str_replace(array('ä','ö','ü','Ä','Ö','Ü','ß'), array('ae','oe','ue','Ae','Oe','Ue','ss'), $value); echo strtolower(preg_replace(array('/-+/', '/^-/', '/-$/'), array('-', '', ''), preg_replace('/[^\da-zA-Z-]/', '-', $value)));
Output for 4.3.0 - 7.1.0
aboed-cd-ae