3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array ( 'name' => array ( 0 => 'test1', 1 => 'test2' ), 'type' => array ( 0 => 'image/jpeg', 1 => 'image/jpeg' ), 'tmp_name' => array ( 0 => 'D:\xampp5\tmp\php5F43.tmp', 1 => 'D:\xampp5\tmp\php5F63.tmp' ), 'error' => array ( 0 => 0, 1 => 0 ), 'size' => array ( 0 => 49293, 1 => 20286 ) ); $result = array(); foreach (array_keys(current($array)) as $key) { $result[$key] = array_combine(array_keys($array), array_column($array, $key)); } print_r($result);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [name] => test1 [type] => image/jpeg [tmp_name] => D:\xampp5\tmp\php5F43.tmp [error] => 0 [size] => 49293 ) [1] => Array ( [name] => test2 [type] => image/jpeg [tmp_name] => D:\xampp5\tmp\php5F63.tmp [error] => 0 [size] => 20286 ) )

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:
142.74 ms | 406 KiB | 5 Q