3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = "aaaaa"; $replacements = array( "aa" => "b", "ba" => "c", "b" => "d", ); print(str_replace(array_keys($replacements), array_values($replacements), $str));
based on ljTPa
Output for 4.3.0 - 7.2.0
dc