3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function test($test) { $arr = array("-1"); if ($test) { $arr = array("1", "2", "1"); } return $arr; } print_r(test(true)); print_r(test(false)); $x = "bla - 0"; $x = str_replace("-", "-1", $x); $x = explode(" ", $x); print_r($x); $arr = array("-1"); $arr = array_fill(0, 15, "-1"); print_r($arr);