3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array=[ [36868=>3], [2112=>3], [35901=>3], [6496=>3], [87=>3], [36868=>3], [68=>3], [9068=>3], [47=>3] ]; foreach($array as $subarray){ foreach($subarray as $k=>$v){ if(!isset($result[$k])){ $result[$k]=$subarray; }else{ $result[$k][$k]+=$v; } } } var_export(array_values($result));
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => array ( 36868 => 6, ), 1 => array ( 2112 => 3, ), 2 => array ( 35901 => 3, ), 3 => array ( 6496 => 3, ), 4 => array ( 87 => 3, ), 5 => array ( 68 => 3, ), 6 => array ( 9068 => 3, ), 7 => array ( 47 => 3, ), )

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