3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myArray = array( '2019-09-28' => array ( 'A' =>4, 'B' => 85, 'C' =>200 ), '2019-09-29' => array ( 'A' =>5, 'B' => 83, 'C' =>202 ) ); $result_arr = []; array_walk($myArray,function($value,$key) use (&$result_arr){ foreach($value as $k=> $val){ $result_arr[$k][$key] = $val; } }); print_r($result_arr);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [A] => Array ( [2019-09-28] => 4 [2019-09-29] => 5 ) [B] => Array ( [2019-09-28] => 85 [2019-09-29] => 83 ) [C] => Array ( [2019-09-28] => 200 [2019-09-29] => 202 ) )

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