function removeAccents($str) { return preg_replace('/[x{0300}-x{036f}]/u',"",normalizer_normalize($str,Normalizer::FORM_D)); } $a = "Jordão"; $b = "Jordao"; var_dump(removeAccents($a) === removeAccents($b));