3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ "name" => [ "0" => "third.png", "1" => "second.png", "2" => "first.png", ], "type" => [ "0" => "image/png", "1" => "image/png", "2" => "image/png", ], "tmp_name" => [ "0" => "/opt/lampp/temp/phpOPmQcB", "1" => "/opt/lampp/temp/phpk0j1yp", "2" => "/opt/lampp/temp/phpS2mhVd", ], "error" => [ "0" => 0, "1" => 0, "2" => 0, ], "size" => [ "0" => 179440, "1" => 102238, "2" => 75915, ], ]; $keys = array_keys($arr); $count = count($arr[$keys[0]]); for($i = 0; $i<$count; $i++){ foreach($keys as $val){ $new[$i][$val] = $arr[$val][$i]; } } var_dump($new);
Output for git.master, git.master_jit, rfc.property-hooks
array(3) { [0]=> array(5) { ["name"]=> string(9) "third.png" ["type"]=> string(9) "image/png" ["tmp_name"]=> string(25) "/opt/lampp/temp/phpOPmQcB" ["error"]=> int(0) ["size"]=> int(179440) } [1]=> array(5) { ["name"]=> string(10) "second.png" ["type"]=> string(9) "image/png" ["tmp_name"]=> string(25) "/opt/lampp/temp/phpk0j1yp" ["error"]=> int(0) ["size"]=> int(102238) } [2]=> array(5) { ["name"]=> string(9) "first.png" ["type"]=> string(9) "image/png" ["tmp_name"]=> string(25) "/opt/lampp/temp/phpS2mhVd" ["error"]=> int(0) ["size"]=> int(75915) } }

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:
26.99 ms | 407 KiB | 5 Q