3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // http://gathering.tweakers.net/forum/list_messages/1605981 // Just a char (http://www.fileformat.info/info/unicode/char/f1/index.htm) $char = 'ñ'; // Combining char (http://en.wikipedia.org/wiki/Combining_character) $charCombining = 'ñ'; $str = 'se'.$char.'or'; $strCombining = 'se'.$charCombining.'or'; var_dump($str, str_replace($char, 'n', $str)); var_dump($strCombining, str_replace($char, 'n', $strCombining));
based on ISU7A
Output for 4.3.0 - 7.2.0
string(6) "señor" string(5) "senor" string(6) "señor" string(5) "senor"