The multibyte version of substr_replace function:
(Inspired by roydukkey's note with some corrections)
function mb_substr_replace($string, $replacement, $start, $length){
return mb_substr($string, 0, $start).$replacement.mb_substr($string, $start+$length);
}