3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $data = array( 'word1'=>'Šššš', 'word2'=>'Zzzzžzzž', 'word3'=>'Āāāa' ); $search = array('Ā', 'ā', 'Š', 'š', 'Ž', 'ž'); $replace = array('A', 'a', 'S', 's', 'Z', 'z'); foreach($data as $key => $value){ $value = str_replace($search, $replace, $value); } print_r($data);
Output for 4.3.0 - 7.1.0
Array ( [word1] => Šššš [word2] => Zzzzžzzž [word3] => Āāāa )