3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $text='Hello. I have two dots. Please replace them!'; echo IHateStrReplace(".","_",$text); function IHateStrReplace($replace_from,$replace_to,$input) { $result=""; for($i=0;$i<strlen($input);$i++) { $result.= $input[$i]; } return $result; }
Output for 4.3.0 - 7.1.0
Hello. I have two dots. Please replace them!