3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $cars = array ( array("Volvo",22,18), array("BMW",15,13), array("Saab",5,2), array("Land Rover",17,15) ); // Produce: You should eat pizza, beer, and ice cream every day $phrase = "You should eat fruits, vegetables, and fiber every day."; $healthy = array("fruits", "vegetables", "fiber"); $yummy = array("pizza", "beer", "ice cream"); $newphrase = str_replace($healthy, $yummy, $phrase); $vevo = '02/09/2016'; echo $vevo; print_r($vevo); $date = new DateTime($vevo); echo $date->format('Y-m-d'); var_dump($cars); var_dump($newphrase); ?>
based on LMHCV
Output for 5.6.0 - 7.3.0rc2
02/09/201602/09/20162016-02-09array(4) { [0]=> array(3) { [0]=> string(5) "Volvo" [1]=> int(22) [2]=> int(18) } [1]=> array(3) { [0]=> string(3) "BMW" [1]=> int(15) [2]=> int(13) } [2]=> array(3) { [0]=> string(4) "Saab" [1]=> int(5) [2]=> int(2) } [3]=> array(3) { [0]=> string(10) "Land Rover" [1]=> int(17) [2]=> int(15) } } string(52) "You should eat pizza, beer, and ice cream every day."