3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = array("abc" => "Ceci est un test", "aaa" => "test test"); $str = str_replace(array("test"), array("chapeau"), $str); var_dump($str);
based on O9jug
Output for 4.3.0 - 7.2.0
array(2) { ["abc"]=> string(19) "Ceci est un chapeau" ["aaa"]=> string(15) "chapeau chapeau" }