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)
8.3.70.0110.01116.75
8.3.60.0210.00016.63
8.3.50.0110.00622.15
8.3.40.0100.00618.76
8.3.30.0080.00819.23
8.3.20.0040.00420.51
8.3.10.0040.00423.45
8.3.00.0060.00319.38
8.2.180.0060.00918.29
8.2.170.0090.00622.96
8.2.160.0080.00620.14
8.2.150.0080.00024.18
8.2.140.0030.00524.66
8.2.130.0030.00526.16
8.2.120.0040.00422.18
8.2.110.0070.01121.12
8.2.100.0090.00317.84
8.2.90.0050.00319.40
8.2.80.0080.00017.97
8.2.70.0000.00917.63
8.2.60.0050.00318.05
8.2.50.0000.00918.07
8.2.40.0030.00619.78
8.2.30.0040.00418.06
8.2.20.0060.00317.79
8.2.10.0050.00317.97
8.2.00.0070.00017.78
8.1.280.0110.00425.92
8.1.270.0040.00422.19
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00622.55
8.1.230.0090.00321.01
8.1.220.0040.00417.79
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0000.00917.64
8.1.180.0060.00318.10
8.1.170.0000.00818.52
8.1.160.0040.00422.11
8.1.150.0030.00718.71
8.1.140.0070.00017.35
8.1.130.0000.00817.95
8.1.120.0050.00317.39
8.1.110.0000.00817.37
8.1.100.0000.00717.47
8.1.90.0040.00417.38
8.1.80.0000.00917.55
8.1.70.0000.00717.47
8.1.60.0070.00317.66
8.1.50.0030.00517.51
8.1.40.0030.00517.45
8.1.30.0000.00817.61
8.1.20.0030.00517.61
8.1.10.0040.00417.57
8.1.00.0030.00617.59
8.0.300.0060.00319.95
8.0.290.0000.00816.75
8.0.280.0070.00018.48
8.0.270.0040.00417.30
8.0.260.0070.00017.26
8.0.250.0030.00316.88
8.0.240.0040.00416.99
8.0.230.0070.00016.93
8.0.220.0000.00716.95
8.0.210.0000.00716.95
8.0.200.0000.00616.85
8.0.190.0000.00817.01
8.0.180.0000.00816.95
8.0.170.0000.00716.83
8.0.160.0000.00716.95
8.0.150.0000.00716.82
8.0.140.0000.00716.91
8.0.130.0030.00313.38
8.0.120.0070.00016.91
8.0.110.0030.00516.92
8.0.100.0030.00616.89
8.0.90.0000.00716.80
8.0.80.0100.00716.84
8.0.70.0060.00316.99
8.0.60.0040.00417.02
8.0.50.0030.00516.94
8.0.30.0200.00517.07
8.0.20.0110.00917.40
8.0.10.0020.00517.00
8.0.00.0110.00916.70
7.4.330.0000.00515.10
7.4.320.0030.00316.63
7.4.300.0050.00216.47
7.4.290.0030.00316.61
7.4.280.0000.00816.63
7.4.270.0040.00416.61
7.4.260.0030.00316.41
7.4.250.0060.00316.59
7.4.240.0040.00316.45
7.4.230.0000.00716.38
7.4.220.0130.00616.70
7.4.210.0070.00816.62
7.4.200.0030.00316.46
7.4.190.0000.00716.48
7.4.160.0090.00916.53
7.4.150.0150.00617.40
7.4.140.0110.01117.86
7.4.130.0070.01216.48
7.4.120.0060.01216.49
7.4.110.0140.01116.53
7.4.100.0120.00616.61
7.4.90.0060.01416.59
7.4.80.0120.01319.39
7.4.70.0070.01116.49
7.4.60.0060.01116.54
7.4.50.0040.00416.43
7.4.40.0120.01216.54
7.4.30.0160.00316.48
7.4.10.0110.00715.14
7.4.00.0070.01114.92
7.3.330.0000.00713.18
7.3.320.0000.00513.36
7.3.310.0080.00016.29
7.3.300.0030.00316.46
7.3.290.0070.01516.40
7.3.280.0050.01216.38
7.3.270.0060.01317.40
7.3.260.0060.01216.38
7.3.250.0120.00616.44
7.3.240.0070.01116.35
7.3.230.0120.00616.39
7.3.210.0060.01216.40
7.3.200.0150.00919.39
7.3.190.0100.00916.65
7.3.180.0130.00916.52
7.3.170.0060.01016.42
7.3.160.0060.01016.36
7.3.130.0100.00714.82
7.3.120.0060.01115.05
7.3.110.0140.00615.14
7.3.100.0100.00315.00
7.3.90.0090.00615.09
7.3.80.0030.01314.82
7.3.70.0030.00614.92
7.3.60.0030.01014.76
7.3.50.0060.00614.93
7.3.40.0060.00914.96
7.3.30.0080.00814.96
7.3.20.0080.00416.55
7.3.10.0100.00316.83
7.3.00.0070.01016.48
7.2.330.0190.00716.86
7.2.320.0130.00316.43
7.2.310.0210.00316.85
7.2.300.0130.01016.82
7.2.290.0160.00316.80
7.2.260.0070.01014.89
7.2.250.0090.00915.11
7.2.240.0090.00615.26
7.2.230.0030.00914.94
7.2.220.0070.01014.94
7.2.210.0070.00715.29
7.2.200.0090.00014.89
7.2.190.0070.00714.99
7.2.180.0030.00915.31
7.2.170.0060.00614.89
7.2.160.0040.01115.04
7.2.150.0070.01116.58
7.2.140.0060.00616.93
7.2.130.0030.01016.92
7.2.120.0090.00616.93
7.2.110.0100.00716.72
7.2.100.0030.01217.10
7.2.90.0100.00716.86
7.2.80.0130.00316.95
7.2.70.0080.01117.08
7.2.60.0040.01116.86
7.2.50.0080.00416.98
7.2.40.0100.00616.86
7.2.30.0070.00716.94
7.2.20.0030.01316.96
7.2.10.0030.01016.75
7.2.00.0050.00718.07
7.1.330.0000.01415.60
7.1.320.0080.00515.85
7.1.310.0090.00615.99
7.1.300.0070.00715.81
7.1.290.0030.01415.63
7.1.280.0080.00415.51
7.1.270.0040.01115.81
7.1.260.0000.01515.79
7.1.250.0080.00315.70
7.1.240.0130.00315.57
7.1.230.0000.01115.90
7.1.220.0100.00015.56
7.1.210.0060.00915.87
7.1.200.0100.00216.02
7.1.190.0100.00615.95
7.1.180.0030.00815.47
7.1.170.0040.00715.84
7.1.160.0070.00715.95
7.1.150.0040.00815.59
7.1.140.0060.00915.75
7.1.130.0030.00615.61
7.1.120.0070.00715.81
7.1.110.0030.01015.96
7.1.100.0050.00917.07
7.1.90.0060.00615.85
7.1.80.0000.01415.80
7.1.70.0050.00716.36
7.1.60.0040.01417.66
7.1.50.0110.00916.32
7.1.40.0080.00815.92
7.1.30.0060.00615.88
7.1.20.0060.00615.79
7.1.10.0000.01515.84
7.1.00.0080.03819.18
7.0.330.0090.00315.36
7.0.320.0030.01015.44
7.0.310.0090.00615.46
7.0.300.0100.00315.50
7.0.290.0090.00615.47
7.0.280.0090.00615.47
7.0.270.0070.00715.56
7.0.260.0060.00915.21
7.0.250.0040.01115.12
7.0.240.0000.01315.50
7.0.230.0030.01215.53
7.0.220.0060.00615.46
7.0.210.0090.00615.62
7.0.200.0000.01316.21
7.0.190.0030.01315.31
7.0.180.0040.00715.57
7.0.170.0100.00315.48
7.0.160.0100.00315.39
7.0.150.0040.01115.45
7.0.140.0070.03718.55
7.0.130.0000.01315.32
7.0.120.0030.00915.59
7.0.110.0110.00415.28
7.0.100.0070.01015.33
7.0.90.0030.00915.11
7.0.80.0000.01615.43
7.0.70.0090.00315.52
7.0.60.0200.04017.75
7.0.50.0070.04516.72
7.0.40.0090.02216.86
7.0.30.0180.04016.87
7.0.20.0190.02316.79
7.0.10.0070.02416.89
7.0.00.0050.04816.83
5.6.400.0040.00414.39
5.6.390.0120.00314.49
5.6.380.0000.01114.43
5.6.370.0130.00614.57
5.6.360.0090.00614.74
5.6.350.0110.00014.46
5.6.340.0070.00714.45
5.6.330.0060.00614.80
5.6.320.0030.00614.32
5.6.310.0040.00714.45
5.6.300.0060.00614.17
5.6.290.0030.00714.20
5.6.280.0060.03717.48
5.6.270.0060.00314.45
5.6.260.0120.00314.72
5.6.250.0030.01014.56
5.6.240.0060.00914.57
5.6.230.0060.01214.46
5.6.220.0000.00914.43
5.6.210.0030.02617.52
5.6.200.0060.04516.28
5.6.190.0040.04717.45
5.6.180.0200.03317.59
5.6.170.0150.02217.43
5.6.160.0050.04517.38
5.6.150.0060.02416.27
5.6.140.0050.04616.24
5.6.130.0140.03816.36
5.6.120.0030.05017.90
5.6.110.0120.04317.62
5.6.100.0050.02417.63
5.6.90.0090.02417.66
5.6.80.0050.04517.54
5.6.70.0000.01214.30
5.6.60.0000.00914.66
5.6.50.0000.00914.51
5.6.40.0000.01614.28
5.6.30.0060.01214.29
5.6.20.0030.00614.27
5.6.10.0030.00914.36
5.6.00.0130.00314.30
5.5.380.0120.00314.54
5.5.370.0000.01614.16
5.5.360.0000.00814.54
5.5.350.0120.02717.34
5.5.340.0070.04216.23
5.5.330.0080.03617.42
5.5.320.0070.04617.42
5.5.310.0180.02317.52
5.5.300.0100.02516.29
5.5.290.0090.03716.18
5.5.280.0050.02317.68
5.5.270.0070.03817.56
5.5.260.0030.03517.57
5.5.250.0050.03517.56
5.5.240.0120.03917.11
5.5.230.0070.00713.94
5.5.220.0090.00614.21
5.5.210.0030.00914.47
5.5.200.0070.00714.27
5.5.190.0110.00714.39
5.5.180.0100.00014.36
5.5.170.0080.00814.51
5.5.160.0040.01114.45
5.5.150.0040.00814.28
5.5.140.0030.00814.47
5.5.130.0030.00614.19
5.5.120.0090.00614.28
5.5.110.0030.01014.24
5.5.100.0110.00314.15
5.5.90.0060.00614.16
5.5.80.0060.01014.31
5.5.70.0000.01214.01
5.5.60.0000.01414.36
5.5.50.0000.01114.07
5.5.40.0070.00714.47
5.5.30.0030.00614.32
5.5.20.0110.00014.44
5.5.10.0060.00614.48
5.5.00.0060.00914.52
5.4.450.0170.02916.49
5.4.440.0050.03816.55
5.4.430.0210.02316.49
5.4.420.0100.04216.61
5.4.410.0130.02816.39
5.4.400.0080.04516.38
5.4.390.0160.03716.33
5.4.380.0050.03516.00
5.4.370.0080.02816.07
5.4.360.0070.03316.13
5.4.350.0110.03016.13
5.4.340.0160.02316.18
5.4.330.0050.00313.52
5.4.320.0060.02113.02
5.4.310.0020.02613.01
5.4.300.0070.02713.02
5.4.290.0070.02413.01
5.4.280.0040.03612.95
5.4.270.0030.03212.96
5.4.260.0070.02712.96
5.4.250.0080.02712.96
5.4.240.0060.03312.96
5.4.230.0070.02912.95
5.4.220.0060.02512.95
5.4.210.0050.02612.95
5.4.200.0080.02512.95
5.4.190.0050.02712.95
5.4.180.0060.02212.95
5.4.170.0060.03012.96
5.4.160.0080.02712.95
5.4.150.0040.03312.95
5.4.140.0110.03412.79
5.4.130.0050.03212.79
5.4.120.0030.02812.76
5.4.110.0040.02212.76
5.4.100.0040.02512.76
5.4.90.0020.02412.76
5.4.80.0040.02612.76
5.4.70.0050.01912.76
5.4.60.0060.02012.76
5.4.50.0090.01712.76
5.4.40.0040.02312.76
5.4.30.0040.02212.75
5.4.20.0040.02212.75
5.4.10.0040.02212.75
5.4.00.0070.03012.50
5.3.290.0050.02313.16
5.3.280.0040.02613.12
5.3.270.0040.02513.12
5.3.260.0080.02013.12
5.3.250.0060.02213.12
5.3.240.0040.02413.12
5.3.230.0040.02213.11
5.3.220.0040.02313.10
5.3.210.0040.02313.10
5.3.200.0080.02113.10
5.3.190.0080.01913.10
5.3.180.0070.02113.10
5.3.170.0070.01913.10
5.3.160.0080.02113.10
5.3.150.0080.02113.09
5.3.140.0040.02313.09
5.3.130.0070.03613.09
5.3.120.0020.02813.09
5.3.110.0050.02213.09
5.3.100.0080.02012.82
5.3.90.0070.02112.81
5.3.80.0050.02212.81
5.3.70.0050.02312.81
5.3.60.0060.02712.80
5.3.50.0060.02812.78
5.3.40.0050.02312.78
5.3.30.0050.02112.75
5.3.20.0050.02412.65
5.3.10.0060.02112.63
5.3.00.0050.03012.62
5.2.170.0060.0379.23
5.2.160.0110.0269.23
5.2.150.0040.0339.23
5.2.140.0130.0439.22
5.2.130.0080.0439.19
5.2.120.0110.0429.18
5.2.110.0110.0399.19
5.2.100.0100.0399.18
5.2.90.0120.0379.18
5.2.80.0100.0409.18
5.2.70.0060.0449.18
5.2.60.0080.0419.14
5.2.50.0130.0539.11
5.2.40.0120.0429.08
5.2.30.0090.0439.05
5.2.20.0080.0399.05
5.2.10.0090.0368.96
5.2.00.0080.0408.81
5.1.60.0060.0368.10
5.1.50.0070.0338.10
5.1.40.0070.0328.08
5.1.30.0080.0388.43
5.1.20.0120.0368.45
5.1.10.0070.0388.18
5.1.00.0140.0328.18
5.0.50.0040.0316.66
5.0.40.0070.0286.52
5.0.30.0060.0446.34
5.0.20.0050.0296.30
5.0.10.0110.0396.28
5.0.00.0060.0466.27
4.4.90.0000.0304.77
4.4.80.0080.0234.75
4.4.70.0070.0234.75
4.4.60.0070.0224.76
4.4.50.0070.0244.77
4.4.40.0040.0344.71
4.4.30.0030.0234.76
4.4.20.0060.0234.85
4.4.10.0080.0214.84
4.4.00.0060.0344.76
4.3.110.0080.0204.67
4.3.100.0080.0204.67
4.3.90.0030.0244.63
4.3.80.0070.0324.59
4.3.70.0060.0214.63
4.3.60.0040.0234.63
4.3.50.0070.0204.63
4.3.40.0070.0304.54
4.3.30.0040.0213.32
4.3.20.0090.0163.30
4.3.10.0050.0203.26
4.3.00.0030.0206.92

preferences:
79.77 ms | 401 KiB | 5 Q