3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = 'bar'; $str[1] = 'A'; echo $str; $char ='3'; $pos = '2'; $str = substr_replace($str,$char,$pos,1); echo '\n'; echo $str;
based on 2Hpu8
Output for 5.3.22 - 7.3.0rc4
bAr\nbA3