3v4l.org

run code in 300+ PHP versions simultaneously
<?php $rows = [ [ 'SessionID' => 1, 'DayofWeek' => 'Sunday', 'SessionDetails' => '1:00 PM', 'Description' => 'Foo', ], [ 'SessionID' => 1, 'DayofWeek' => 'Sunday', 'SessionDetails' => '1:00 PM', 'Description' => 'Foo', ], [ 'SessionID' => 2, 'DayofWeek' => 'Monday', 'SessionDetails' => '10:00 AM', 'Description' => 'Foo', ], [ 'SessionID' => 2, 'DayofWeek' => 'Monday', 'SessionDetails' => '10:00 AM', 'Description' => 'Foo', ], [ 'SessionID' => 3, 'DayofWeek' => 'Monday', 'SessionDetails' => '7:00 PM', 'Description' => 'Barr', ], [ 'SessionID' => 3, 'DayofWeek' => 'Monday', 'SessionDetails' => '7:00 PM', 'Description' => 'Barr', ], ]; $result = []; foreach (array_unique($rows, SORT_REGULAR) as $row) { $result[$row['DayofWeek']][] = $row; } print_r($result);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [Sunday] => Array ( [0] => Array ( [SessionID] => 1 [DayofWeek] => Sunday [SessionDetails] => 1:00 PM [Description] => Foo ) ) [Monday] => Array ( [0] => Array ( [SessionID] => 2 [DayofWeek] => Monday [SessionDetails] => 10:00 AM [Description] => Foo ) [1] => Array ( [SessionID] => 3 [DayofWeek] => Monday [SessionDetails] => 7:00 PM [Description] => Barr ) ) )

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:
50.42 ms | 1837 KiB | 4 Q