3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = "pomo"; $pos = 2; $str_to_replace = "aa"; $new_str = substr($str, 0, ($pos-1)).$str_to_replace.substr($str, $pos); echo $new_str;
Output for 4.3.0 - 7.2.0
paamo