3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array ( 'EVENTNAME' => array ( 0 => 'Brexit', 1 => 'leave date set', 2 => 'leave date ', 3 => 'deal or no deal', ), 'IMMIGRATIONS' => array ( 0 => '1', 1 => '1', 2 => '1', 3 => '1', ), 'EFFECTS' => array ( 0 => '2', 1 => '1', 2 => '1', 3 => '2', ), 'SUPPLYCHAINS' => array ( 0 => '1', 1 => '1', 2 => '1', 3 => '1', ), ); $keys = array_keys($arr); foreach($arr[$keys[0]] as $key => $val){ $result[$val] = array_column(array_slice($arr,1), $key); } var_export($result);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 'Brexit' => array ( 0 => '1', 1 => '2', 2 => '1', ), 'leave date set' => array ( 0 => '1', 1 => '1', 2 => '1', ), 'leave date ' => array ( 0 => '1', 1 => '1', 2 => '1', ), 'deal or no deal' => array ( 0 => '1', 1 => '2', 2 => '1', ), )

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