3v4l.org

run code in 300+ PHP versions simultaneously
<?php $vehicle = ["vehicle" => [ 0 => "Acura", 1 => "Mazda" ]]; $d = ["doors" => [ 0 => "4 Door", 1 => "2 Door" ]]; Foreach($vehicle["vehicle"] as $key => $v){ $temp["vehicle" . ($key+1)]["vehicle"] = $v; $temp["vehicle" . ($key+1)]["doors"] = $d["doors"][$key]; } Extract($temp); Var_dump($vehicle1, $vehicle2);
Output for git.master, git.master_jit, rfc.property-hooks
array(2) { ["vehicle"]=> string(5) "Acura" ["doors"]=> string(6) "4 Door" } array(2) { ["vehicle"]=> string(5) "Mazda" ["doors"]=> string(6) "2 Door" }

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
162.79 ms | 405 KiB | 5 Q