3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function replace_old_chrs_utf8($str) { $vd = strtoupper('ð'); $old = array('æ', 'Æ', 'è', 'È', 'ð', $vd); $new = array('ć', 'Ć', 'č', 'Č', 'đ', 'Đ'); $fin = str_replace($old, $new, $str); return $fin; } $testString = 'æ-Æ bananna è moose Èð'; var_dump(replace_old_chrs_utf8($testString));
Output for 4.3.0 - 7.2.0
string(27) "ć-Ć bananna č moose Čđ"