3v4l.org

run code in 150+ 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 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(2) { ["abc"]=> string(19) "Ceci est un chapeau" ["aaa"]=> string(15) "chapeau chapeau" }