3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tickets = array( array( 'id' => 13, 'pid' => 1, 'owner' => 'jachim', 'time' => '2009-09-25 10:39:42.011612', 'project' => 'jachim.be', 'title' => 'Some random ticket' ), array( 'id' => 31, 'pid' => 2, 'owner' => 'jachim', 'time' => '2009-09-24 14:38:47.945020', 'project' => 'joggink.be', 'title' => 'Some other random ticket' ), array( 'id' => 22, 'pid' => 3, 'owner' => 'root', 'time' => '2009-09-24 10:58:02.904198', 'project' => 'joggink.be', 'title' => 'A specific ticket' ) array( 'id' => 18, 'pid' => 4, 'owner' => 'root', 'time' => '2009-09-24 10:58:02.904198', 'project' => 'joggink.be', 'title' => 'A specific ticket' ) ); function msort($array, $key, $sort_flags = SORT_REGULAR) { if (is_array($array) && count($array) > 0) { if (!empty($key)) { $mapping = array(); foreach ($array as $k => $v) { $sort_key = ''; if (!is_array($key)) { $sort_key = $v[$key]; } else { // @TODO This should be fixed, now it will be sorted as string foreach ($key as $key_key) { $sort_key .= $v[$key_key]; } $sort_flags = SORT_STRING; } $mapping[$k] = $sort_key; } asort($mapping, $sort_flags); $sorted = array(); foreach ($mapping as $k => $v) { $sorted[] = $array[$k]; } return $sorted; } } return $array; } //var_dump($tickets); $tickets = msort($tickets, array('pid','id')); var_dump($tickets); ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.290.0060.04112.49
5.4.280.0080.04712.38
5.4.270.0110.04012.38
5.4.260.0100.04912.38
5.4.250.0060.04912.38
5.4.240.0060.03912.39
5.4.230.0070.04612.38
5.4.220.0080.04912.38
5.4.210.0090.04512.38
5.4.200.0070.06012.38
5.4.190.0090.04312.37
5.4.180.0100.04712.37
5.4.170.0110.04712.38
5.4.160.0100.05212.38
5.4.150.0090.05012.37
5.4.140.0080.04912.06
5.4.130.0070.04312.05
5.4.120.0060.04612.01
5.4.110.0110.04312.01
5.4.100.0070.03912.00
5.4.90.0070.03812.01
5.4.80.0040.04212.01
5.4.70.0090.03412.00
5.4.60.0080.03512.00
5.4.50.0120.04712.00
5.4.40.0100.04111.99
5.4.30.0100.04511.99
5.4.20.0070.04311.98
5.4.10.0090.04411.99
5.4.00.0070.04411.48
5.3.280.0080.04712.71
5.3.270.0090.05512.72
5.3.260.0110.06612.72
5.3.250.0100.05612.72
5.3.240.0100.05812.72
5.3.230.0100.05012.71
5.3.220.0090.07412.68
5.3.210.0050.04612.68
5.3.200.0100.06112.68
5.3.190.0100.04912.67
5.3.180.0110.05012.68
5.3.170.0100.05712.66
5.3.160.0120.04612.67
5.3.150.0070.05812.67
5.3.140.0100.06012.66
5.3.130.0070.05812.66
5.3.120.0110.05112.66
5.3.110.0070.05512.66
5.3.100.0040.05512.12
5.3.90.0050.05712.08
5.3.80.0040.05012.07
5.3.70.0110.04012.07
5.3.60.0080.03512.06
5.3.50.0110.03112.00
5.3.40.0090.03412.00
5.3.30.0060.04011.95
5.3.20.0060.03611.75
5.3.10.0100.04011.70
5.3.00.0050.03811.68

preferences:
142.16 ms | 1394 KiB | 7 Q