3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = [ 0 => [ 'regulations_label' => 'Europe', 'groups_label' => 'G1', 'filters_label' => 'FF1' ], 1 => [ 'regulations_label' => 'Europe', 'groups_label' => 'G1', 'filters_label' => 'FF900' ], 2 => [ 'regulations_label' => 'Europe', 'groups_label' => 'G1', 'filters_label' => 'FF324234' ], 3 => [ 'regulations_label' => 'Europe', 'groups_label' => 'G2', 'filters_label' => 'FF23942' ], 4 => [ 'regulations_label' => 'America', 'groups_label' => 'G29', 'filters_label' => 'FF3242' ], 5 => [ 'regulations_label' => 'America', 'groups_label' => 'G29', 'filters_label' => 'FF78978' ], 6 => [ 'regulations_label' => 'America', 'groups_label' => 'G29', 'filters_label' => 'FF48395043' ], 7 => [ 'regulations_label' => 'Asia', 'groups_label' => 'G2000', 'filters_label' => 'FF7' ] ]; $group = []; foreach($data as $v){ $group[$v['regulations_label']][$v['groups_label']][] = $v['filters_label']; } echo '<pre>'; print_r($group);
Output for git.master, git.master_jit, rfc.property-hooks
<pre>Array ( [Europe] => Array ( [G1] => Array ( [0] => FF1 [1] => FF900 [2] => FF324234 ) [G2] => Array ( [0] => FF23942 ) ) [America] => Array ( [G29] => Array ( [0] => FF3242 [1] => FF78978 [2] => FF48395043 ) ) [Asia] => Array ( [G2000] => Array ( [0] => FF7 ) ) )

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:
34.68 ms | 402 KiB | 8 Q