3v4l.org

run code in 150+ 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 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
string(6) "señor" string(5) "senor" string(6) "señor" string(5) "senor"