3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function _normalizaString($string) { $a = "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûýýþÿŔŕ"; $b = "aaaaaaaceeeeiiiidnoooooouuuuybsaaaaaaaceeeeiiiidnoooooouuuyybyRr"; $string = strtr($string, $a, $b); return preg_replace('/\s+/', ' ', trim(strtolower($string), '()[]{}._\t\b\r')); } echo _normalizaString('ação');
Output for 4.3.0 - 7.2.0
ar�r�o