3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array ( 0 => array ( 0 => array ( 'personNum' => 2, 'type' => 'comment', 'datetime' => '2019-05-15 11:29:45' ), 1 => array ( 'personNum' => 3, 'type' => 'status', 'datetime' => '2019-05-26 15:59:53' ) ), 1 => array ( 0 => array ( 'personNum' => 3, 'type' => 'status', 'datetime' => '2019-05-26 15:59:53' ), 1 => array ( 'personNum' => 4, 'type' => 'status', 'datetime' => '2019-05-26 16:04:24' ), ) ); array_walk($arr, function (&$v) { array_multisort(array_column($v, 'datetime'), SORT_DESC, $v); }); usort($arr, function ($a, $b) { return strcmp(max(array_column($b, 'datetime')), max(array_column($a, 'datetime'))); }); print_r($arr);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [0] => Array ( [personNum] => 4 [type] => status [datetime] => 2019-05-26 16:04:24 ) [1] => Array ( [personNum] => 3 [type] => status [datetime] => 2019-05-26 15:59:53 ) ) [1] => Array ( [0] => Array ( [personNum] => 3 [type] => status [datetime] => 2019-05-26 15:59:53 ) [1] => Array ( [personNum] => 2 [type] => comment [datetime] => 2019-05-15 11:29:45 ) ) )

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:
41.28 ms | 408 KiB | 5 Q