3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = [ 'name' => [ (int) 0 => '095a108478345cac184f956b1e8dee91a5a89f87bbabd7b3fb4058f577adf.jpg', (int) 1 => '02059.jpg', (int) 2 => 'avatar.jpg' ], 'type' => [ (int) 0 => 'image/jpeg', (int) 1 => 'image/jpeg', (int) 2 => 'image/jpeg' ], 'tmp_name' => [ (int) 0 => 'C:\xampp\tmp\php17AA.tmp', (int) 1 => 'C:\xampp\tmp\php17BA.tmp', (int) 2 => 'C:\xampp\tmp\php17BB.tmp' ], 'error' => [ (int) 0 => (int) 0, (int) 1 => (int) 0, (int) 2 => (int) 0 ], 'size' => [ (int) 0 => (int) 80542, (int) 1 => (int) 6532, (int) 2 => (int) 6879 ] ]; $ret = []; $keys = array_keys($data); for ($i=0; $i<3; $i++) { $ret[$i] = array_combine($keys, array_map(function($element) use ($i){ return $element[$i]; }, $data)); } var_dump($ret);
Output for git.master, git.master_jit, rfc.property-hooks
array(3) { [0]=> array(5) { ["name"]=> string(65) "095a108478345cac184f956b1e8dee91a5a89f87bbabd7b3fb4058f577adf.jpg" ["type"]=> string(10) "image/jpeg" ["tmp_name"]=> string(24) "C:\xampp\tmp\php17AA.tmp" ["error"]=> int(0) ["size"]=> int(80542) } [1]=> array(5) { ["name"]=> string(9) "02059.jpg" ["type"]=> string(10) "image/jpeg" ["tmp_name"]=> string(24) "C:\xampp\tmp\php17BA.tmp" ["error"]=> int(0) ["size"]=> int(6532) } [2]=> array(5) { ["name"]=> string(10) "avatar.jpg" ["type"]=> string(10) "image/jpeg" ["tmp_name"]=> string(24) "C:\xampp\tmp\php17BB.tmp" ["error"]=> int(0) ["size"]=> int(6879) } }

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