3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class myProcess { function __construct($sameArray){ $mySentence = json_encode($sameArray); $mySentence = preg_replace('/o/','t',$mySentence); $otherArray = json_decode($mySentence); print($otherArray); //this is line 45 //print($mySentence); //$placements = array ("John" => "Jose", "Smith" => "Tobar"); // preg_replace("/:(\w+)/e", $placements[$1], $mySentence); } } ?>
Output for 4.3.0 - 7.2.0