3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tickets = array( array( 'id' => 13, 'owner' => 'jachim', 'time' => '2009-09-25 10:39:42.011612', 'project' => 'jachim.be', 'title' => 'Some random ticket' ), array( 'id' => 31, 'owner' => 'jachim', 'time' => '2009-09-24 14:38:47.945020', 'project' => 'joggink.be', 'title' => 'Some other random ticket' ), array( 'id' => 22, '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('owner', 'time')); 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)
8.3.70.0160.00616.36
8.3.60.0130.00716.63
8.3.50.0080.00822.11
8.3.40.0110.00718.79
8.3.30.0100.00719.04
8.3.20.0040.00420.21
8.3.10.0040.00423.61
8.3.00.0090.00019.38
8.2.180.0120.00618.43
8.2.170.0030.01222.96
8.2.160.0110.00420.39
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00422.25
8.2.110.0030.00722.14
8.2.100.0070.00717.78
8.2.90.0000.00819.39
8.2.80.0050.00317.97
8.2.70.0090.00017.63
8.2.60.0040.00418.04
8.2.50.0000.00818.07
8.2.40.0060.00319.95
8.2.30.0070.00018.03
8.2.20.0040.00417.89
8.2.10.0000.00818.19
8.2.00.0070.00017.78
8.1.280.0070.00725.92
8.1.270.0090.00022.12
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0080.00022.13
8.1.230.0040.01119.08
8.1.220.0080.00017.78
8.1.210.0040.00418.77
8.1.200.0070.00317.38
8.1.190.0050.00317.25
8.1.180.0000.00918.10
8.1.170.0000.00818.47
8.1.160.0080.00022.04
8.1.150.0000.01018.70
8.1.140.0040.00417.47
8.1.130.0000.00717.89
8.1.120.0040.00417.50
8.1.110.0030.00617.39
8.1.100.0020.00517.52
8.1.90.0040.00417.49
8.1.80.0050.00217.32
8.1.70.0030.00517.36
8.1.60.0060.00317.57
8.1.50.0030.00517.52
8.1.40.0030.00617.49
8.1.30.0030.00617.71
8.1.20.0040.00417.72
8.1.10.0040.00417.61
8.1.00.0040.00417.43
8.0.300.0060.00318.77
8.0.290.0030.00617.16
8.0.280.0030.00318.47
8.0.270.0050.00317.29
8.0.260.0030.00317.20
8.0.250.0070.00016.91
8.0.240.0070.00017.01
8.0.230.0000.00716.96
8.0.220.0030.00316.92
8.0.210.0000.00716.80
8.0.200.0030.00317.02
8.0.190.0090.00016.93
8.0.180.0000.00816.95
8.0.170.0070.00016.97
8.0.160.0040.00416.98
8.0.150.0030.00516.88
8.0.140.0000.01016.82
8.0.130.0000.00613.41
8.0.120.0040.00416.79
8.0.110.0000.00816.80
8.0.100.0030.00616.70
8.0.90.0000.00816.72
8.0.80.0110.01016.87
8.0.70.0000.00716.79
8.0.60.0080.00016.96
8.0.50.0070.00016.88
8.0.30.0130.00717.09
8.0.20.0110.00817.40
8.0.10.0040.00416.93
8.0.00.0110.00716.77
7.4.330.0000.00515.20
7.4.320.0040.00416.62
7.4.300.0040.00416.63
7.4.290.0000.00716.60
7.4.280.0030.00516.52
7.4.270.0040.00416.67
7.4.260.0030.00316.54
7.4.250.0070.00016.60
7.4.240.0070.00216.61
7.4.230.0000.00716.53
7.4.220.0140.00416.43
7.4.210.0080.00716.63
7.4.200.0030.00316.56
7.4.190.0000.00716.67
7.4.160.0100.01016.47
7.4.150.0090.00917.40
7.4.140.0110.01317.86
7.4.130.0050.01216.69
7.4.120.0090.01116.57
7.4.110.0160.00816.61
7.4.100.0110.01516.47
7.4.90.0060.01216.43
7.4.80.0130.01019.39
7.4.70.0090.00616.54
7.4.60.0100.00716.52
7.4.50.0080.00016.42
7.4.40.0120.00616.71
7.4.30.0140.00516.45
7.4.10.0060.01215.30
7.4.00.0070.01115.20
7.3.330.0070.00013.32
7.3.320.0030.00313.33
7.3.310.0030.00516.20
7.3.300.0000.00816.23
7.3.290.0030.01316.40
7.3.280.0070.01016.36
7.3.270.0100.01017.40
7.3.260.0110.00816.39
7.3.250.0160.00616.52
7.3.240.0100.00716.55
7.3.230.0070.01316.39
7.3.210.0110.00816.44
7.3.200.0100.01019.39
7.3.190.0160.00916.64
7.3.180.0120.00916.40
7.3.170.0070.01016.46
7.3.160.0150.00416.56
7.3.130.0030.00915.30
7.3.120.0090.00815.03
7.3.110.0070.01315.30
7.3.100.0070.00715.30
7.3.90.0070.01115.30
7.3.80.0060.01315.30
7.3.70.0120.00315.30
7.3.60.0040.01115.30
7.3.50.0090.00615.30
7.3.40.0040.01515.30
7.3.30.0180.00015.30
7.3.20.0050.00516.58
7.3.10.0100.00616.42
7.3.00.0000.01316.77
7.2.330.0130.00616.82
7.2.320.0100.00716.78
7.2.310.0090.00916.72
7.2.300.0090.00816.66
7.2.290.0060.01316.93
7.2.260.0100.01015.37
7.2.250.0070.01015.30
7.2.240.0120.00315.37
7.2.230.0030.00815.30
7.2.220.0060.00915.30
7.2.210.0110.00315.30
7.2.200.0000.01415.30
7.2.190.0030.00715.30
7.2.180.0090.00615.30
7.2.170.0090.00615.30
7.2.160.0060.00915.30
7.2.150.0060.00617.06
7.2.140.0110.00316.70
7.2.130.0000.01317.16
7.2.120.0130.00317.02
7.2.110.0120.00316.95
7.2.100.0060.00916.74
7.2.90.0000.01516.91
7.2.80.0090.00416.81
7.2.70.0090.00616.91
7.2.60.0050.00917.06
7.2.50.0060.00616.91
7.2.40.0040.00816.95
7.2.30.0070.00716.76
7.2.20.0070.00717.01
7.2.10.0070.00717.00
7.2.00.0050.01017.93
7.1.330.0070.00715.57
7.1.320.0130.00615.97
7.1.310.0090.00615.70
7.1.300.0080.00315.47
7.1.290.0000.01615.98
7.1.280.0070.00715.65
7.1.270.0040.00815.57
7.1.260.0100.00715.75
7.1.250.0110.00015.70
7.1.240.0000.01415.83
7.1.230.0030.00715.68
7.1.220.0070.00815.81
7.1.210.0000.01415.87
7.1.200.0050.00715.77
7.1.190.0040.00715.77
7.1.180.0060.00615.71
7.1.170.0000.01315.86
7.1.160.0030.01415.77
7.1.150.0060.00315.94
7.1.140.0090.00915.55
7.1.130.0100.00315.82
7.1.120.0000.01315.71
7.1.110.0040.01115.71
7.1.100.0020.01217.18
7.1.90.0150.00015.60
7.1.80.0100.00315.85
7.1.70.0030.00916.49
7.1.60.0050.01517.64
7.1.50.0070.01216.33
7.1.40.0030.00616.02
7.1.30.0000.01016.04
7.1.20.0000.01315.98
7.1.10.0060.00615.45
7.1.00.0050.04418.97
7.0.330.0030.00615.58
7.0.320.0100.00315.48
7.0.310.0000.01215.57
7.0.300.0070.00715.44
7.0.290.0070.00715.41
7.0.280.0070.00715.43
7.0.270.0070.00715.48
7.0.260.0090.00015.57
7.0.250.0000.01315.30
7.0.240.0070.00315.58
7.0.230.0080.00515.52
7.0.220.0070.00415.38
7.0.210.0090.00615.30
7.0.200.0020.00915.88
7.0.190.0090.00015.40
7.0.180.0000.01415.62
7.0.170.0090.00615.44
7.0.160.0070.00715.54
7.0.150.0090.00915.52
7.0.140.0050.04218.82
7.0.130.0090.00315.36
7.0.120.0070.00715.44
7.0.110.0120.00015.36
7.0.100.0080.00415.59
7.0.90.0060.00315.59
7.0.80.0000.01515.41
7.0.70.0030.00515.45
7.0.60.0110.04117.66
7.0.50.0110.04116.77
7.0.40.0060.03817.77
7.0.30.0150.04517.68
7.0.20.0150.04717.69
7.0.10.0020.05317.69
7.0.00.0080.02317.76
5.6.400.0070.00715.30
5.6.390.0060.00915.30
5.6.380.0100.00315.30
5.6.370.0070.00715.30
5.6.360.0000.01015.30
5.6.350.0040.00815.30
5.6.340.0040.01415.30
5.6.330.0080.00415.30
5.6.320.0060.00915.30
5.6.310.0000.01515.30
5.6.300.0090.00915.30
5.6.290.0030.01215.30
5.6.280.0050.03818.21
5.6.270.0040.01115.30
5.6.260.0070.01015.30
5.6.250.0060.00315.30
5.6.240.0160.00315.30
5.6.230.0060.00615.30
5.6.220.0070.00715.30
5.6.210.0060.04817.90
5.6.200.0060.02616.74
5.6.190.0050.02717.97
5.6.180.0150.04117.88
5.6.170.0150.02617.89
5.6.160.0070.04317.92
5.6.150.0050.02916.74
5.6.140.0060.03516.72
5.6.130.0030.04916.71
5.6.120.0050.02718.22
5.6.110.0090.04318.21
5.6.100.0060.04118.21
5.6.90.0110.03818.20
5.6.80.0080.04517.92
5.6.70.0060.01115.30
5.6.60.0090.00615.30
5.6.50.0030.00715.30
5.6.40.0110.00515.30
5.6.30.0060.01015.30
5.6.20.0140.00015.30
5.6.10.0030.00615.30
5.6.00.0060.01015.30
5.5.380.0000.00915.30
5.5.370.0000.00815.30
5.5.360.0000.00915.30
5.5.350.0260.03817.87
5.5.340.0030.04316.62
5.5.330.0050.04417.80
5.5.320.0200.03617.89
5.5.310.0240.03717.77
5.5.300.0070.02316.66
5.5.290.0020.04416.65
5.5.280.0080.03517.98
5.5.270.0050.03418.10
5.5.260.0030.02718.04
5.5.250.0000.04117.95
5.5.240.0080.03917.83
5.5.230.0100.00715.30
5.5.220.0070.00715.30
5.5.210.0080.00815.30
5.5.200.0100.00715.30
5.5.190.0090.00615.30
5.5.180.0000.00915.30
5.5.170.0100.01015.30
5.5.160.0070.01115.30
5.5.150.0030.00615.30
5.5.140.0040.01515.30
5.5.130.0040.01015.30
5.5.120.0000.01915.30
5.5.110.0040.01115.30
5.5.100.0080.00015.30
5.5.90.0050.00515.30
5.5.80.0000.01515.30
5.5.70.0040.00815.30
5.5.60.0030.00915.30
5.5.50.0130.00315.30
5.5.40.0040.00815.30
5.5.30.0030.01415.30
5.5.20.0000.01115.30
5.5.10.0030.00915.30
5.5.00.0060.01015.30
5.4.450.0080.03717.46
5.4.440.0180.03317.30
5.4.430.0130.03217.34
5.4.420.0130.03917.39
5.4.410.0150.02517.31
5.4.400.0120.03217.29
5.4.390.0220.02417.14
5.4.380.0100.02617.03
5.4.370.0060.03516.94
5.4.360.0080.03116.91
5.4.350.0040.03317.02
5.4.340.0040.03616.93
5.4.330.0070.00715.30
5.4.320.0050.02313.90
5.4.310.0060.02213.90
5.4.300.0090.02013.91
5.4.290.0070.03013.89
5.4.280.0070.02113.85
5.4.270.0050.01913.85
5.4.260.0070.02213.85
5.4.250.0060.02113.84
5.4.240.0020.02513.84
5.4.230.0040.02113.84
5.4.220.0040.02213.84
5.4.210.0050.01913.84
5.4.200.0070.02213.84
5.4.190.0050.02413.84
5.4.180.0050.02213.84
5.4.170.0020.02413.84
5.4.160.0060.02113.84
5.4.150.0080.01913.84
5.4.140.0020.02813.68
5.4.130.0060.02813.67
5.4.120.0020.03113.65
5.4.110.0060.02313.65
5.4.100.0070.02013.65
5.4.90.0070.02113.65
5.4.80.0090.02213.65
5.4.70.0050.02313.65
5.4.60.0020.02413.65
5.4.50.0090.02313.65
5.4.40.0070.02113.64
5.4.30.0030.02613.64
5.4.20.0080.02013.64
5.4.10.0050.02613.64
5.4.00.0070.02813.38
5.3.290.0040.02514.05
5.3.280.0060.02714.00
5.3.270.0080.02814.01
5.3.260.0070.02414.01
5.3.250.0040.02314.01
5.3.240.0040.02314.01
5.3.230.0080.02514.00
5.3.220.0070.02913.99
5.3.210.0070.02313.99
5.3.200.0050.02313.99
5.3.190.0050.02413.99
5.3.180.0060.02013.99
5.3.170.0080.02713.98
5.3.160.0060.02313.99
5.3.150.0080.02513.98
5.3.140.0060.02213.98
5.3.130.0040.02513.98
5.3.120.0040.02413.98
5.3.110.0040.02313.98
5.3.100.0030.02513.71
5.3.90.0050.02313.70
5.3.80.0050.03113.70
5.3.70.0080.02513.70
5.3.60.0070.02413.69
5.3.50.0040.02213.66
5.3.40.0050.02413.66
5.3.30.0080.02113.64
5.3.20.0060.01813.53
5.3.10.0060.02113.51
5.3.00.0090.01913.51
5.2.170.0060.0329.23
5.2.160.0080.0339.23
5.2.150.0080.0289.23
5.2.140.0090.0279.23
5.2.130.0050.0309.18
5.2.120.0040.0299.19
5.2.110.0080.0269.19
5.2.100.0070.0429.18
5.2.90.0060.0499.18
5.2.80.0110.0459.18
5.2.70.0100.0449.18
5.2.60.0090.0429.14
5.2.50.0100.0419.11
5.2.40.0090.0459.08
5.2.30.0070.0539.05
5.2.20.0110.0479.04
5.2.10.0070.0398.95
5.2.00.0050.0528.81
5.1.60.0080.0378.10
5.1.50.0050.0388.09
5.1.40.0070.0378.08
5.1.30.0060.0418.43
5.1.20.0070.0488.45
5.1.10.0080.0398.17
5.1.00.0080.0388.17
5.0.50.0060.0306.66
5.0.40.0060.0206.52
5.0.30.0060.0416.33
5.0.20.0050.0186.30
5.0.10.0040.0216.27
5.0.00.0050.0316.27
4.4.90.0040.0154.78
4.4.80.0060.0154.75
4.4.70.0040.0164.75
4.4.60.0040.0154.76
4.4.50.0040.0164.77
4.4.40.0030.0264.71
4.4.30.0060.0134.76
4.4.20.0060.0134.85
4.4.10.0010.0194.85
4.4.00.0040.0254.76
4.3.110.0040.0154.67
4.3.100.0010.0194.67
4.3.90.0030.0164.63
4.3.80.0030.0244.58
4.3.70.0020.0164.63
4.3.60.0060.0124.62
4.3.50.0060.0134.63
4.3.40.0020.0254.54
4.3.30.0040.0143.32
4.3.20.0030.0163.30
4.3.10.0030.0203.25
4.3.00.0000.0276.91

preferences:
53.96 ms | 401 KiB | 5 Q