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('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.60.0160.00318.43
8.3.50.0120.00522.15
8.3.40.0120.00318.88
8.3.30.0140.00719.17
8.3.20.0000.00820.29
8.3.10.0080.00023.65
8.3.00.0030.00619.35
8.2.180.0120.00418.13
8.2.170.0080.00822.96
8.2.160.0100.00620.57
8.2.150.0050.00324.18
8.2.140.0050.00324.66
8.2.130.0050.00326.16
8.2.120.0060.00321.97
8.2.110.0080.00419.38
8.2.100.0040.00817.91
8.2.90.0080.00019.27
8.2.80.0040.00417.97
8.2.70.0040.00417.75
8.2.60.0080.00018.16
8.2.50.0050.00318.07
8.2.40.0000.00819.88
8.2.30.0070.00018.03
8.2.20.0060.00317.78
8.2.10.0020.00518.21
8.2.00.0060.00317.81
8.1.280.0060.01225.92
8.1.270.0050.00222.04
8.1.260.0030.00626.35
8.1.250.0000.00828.09
8.1.240.0040.00419.21
8.1.230.0090.00319.07
8.1.220.0090.00017.74
8.1.210.0030.00518.77
8.1.200.0030.00617.00
8.1.190.0030.00517.25
8.1.180.0000.00818.10
8.1.170.0040.00418.51
8.1.160.0080.00022.05
8.1.150.0100.00018.71
8.1.140.0030.00617.49
8.1.130.0030.00317.70
8.1.120.0040.00417.49
8.1.110.0030.00517.35
8.1.100.0000.00817.58
8.1.90.0070.00017.52
8.1.80.0040.00417.53
8.1.70.0000.00717.43
8.1.60.0030.00617.53
8.1.50.0030.00517.52
8.1.40.0000.00817.40
8.1.30.0030.00517.66
8.1.20.0030.00617.55
8.1.10.0050.00317.52
8.1.00.0030.00617.52
8.0.300.0060.00319.15
8.0.290.0000.00817.18
8.0.280.0000.00718.48
8.0.270.0040.00417.26
8.0.260.0000.00617.39
8.0.250.0030.00316.96
8.0.240.0000.00716.90
8.0.230.0000.00816.98
8.0.220.0030.00316.91
8.0.210.0030.00316.96
8.0.200.0030.00317.05
8.0.190.0030.00616.99
8.0.180.0020.00517.00
8.0.170.0080.00016.91
8.0.160.0080.00016.85
8.0.150.0000.00716.82
8.0.140.0050.00516.91
8.0.130.0030.00313.32
8.0.120.0040.00416.89
8.0.110.0040.00416.86
8.0.100.0060.00316.91
8.0.90.0080.00016.79
8.0.80.0140.00316.84
8.0.70.0000.00716.95
8.0.60.0040.00416.88
8.0.50.0040.00416.98
8.0.30.0080.01216.98
8.0.20.0120.00917.40
8.0.10.0000.00717.14
8.0.00.0090.01516.81
7.4.330.0050.00015.05
7.4.320.0000.00716.63
7.4.300.0000.00716.63
7.4.290.0000.00716.54
7.4.280.0000.00716.63
7.4.270.0000.00716.40
7.4.260.0040.00416.54
7.4.250.0030.00516.39
7.4.240.0030.00416.62
7.4.230.0000.00716.51
7.4.220.0040.01416.65
7.4.210.0120.00216.67
7.4.200.0000.00716.42
7.4.190.0040.00416.57
7.4.160.0120.00616.46
7.4.150.0060.01317.40
7.4.140.0170.00417.86
7.4.130.0070.01316.42
7.4.120.0050.01316.57
7.4.110.0170.01016.64
7.4.100.0100.01016.44
7.4.90.0030.01416.57
7.4.80.0090.01919.39
7.4.70.0140.00416.65
7.4.60.0150.00416.41
7.4.50.0000.00816.21
7.4.40.0090.01016.38
7.4.30.0030.01716.62
7.4.10.0060.01314.89
7.4.00.0100.00815.04
7.3.330.0030.00313.38
7.3.320.0030.00313.26
7.3.310.0030.00316.38
7.3.300.0000.00716.28
7.3.290.0080.01216.41
7.3.280.0090.00916.41
7.3.270.0060.01317.40
7.3.260.0090.01216.64
7.3.250.0100.01116.41
7.3.240.0150.00316.63
7.3.230.0180.00016.71
7.3.210.0120.01216.37
7.3.200.0070.01619.39
7.3.190.0130.01016.48
7.3.180.0100.00716.26
7.3.170.0150.00616.50
7.3.160.0100.00716.41
7.3.130.0160.00315.07
7.3.120.0050.01414.98
7.3.110.0030.01714.90
7.3.100.0070.01115.10
7.3.90.0090.00615.09
7.3.80.0040.00714.90
7.3.70.0060.00914.90
7.3.60.0060.00614.66
7.3.50.0140.00014.96
7.3.40.0040.01114.99
7.3.30.0070.00714.90
7.3.20.0070.00716.66
7.3.10.0090.00816.22
7.3.00.0080.00816.57
7.2.330.0120.00616.86
7.2.320.0000.01816.48
7.2.310.0100.01316.69
7.2.300.0110.00716.95
7.2.290.0120.00916.54
7.2.260.0070.01115.12
7.2.250.0040.01515.01
7.2.240.0100.00715.32
7.2.230.0100.00715.11
7.2.220.0090.00615.21
7.2.210.0060.00615.18
7.2.200.0000.01715.02
7.2.190.0030.01015.04
7.2.180.0060.00614.84
7.2.170.0040.01115.08
7.2.160.0030.01014.95
7.2.150.0030.01016.55
7.2.140.0060.00916.69
7.2.130.0120.00716.76
7.2.120.0080.00716.73
7.2.110.0120.00516.77
7.2.100.0050.01116.71
7.2.90.0100.00416.74
7.2.80.0070.00516.78
7.2.70.0090.00816.82
7.2.60.0070.00916.68
7.2.50.0050.00416.77
7.2.40.0050.00716.88
7.2.30.0060.00716.77
7.2.20.0050.00916.91
7.2.10.0090.00616.76
7.2.00.0050.00717.44
7.1.330.0000.01315.55
7.1.320.0030.01015.82
7.1.310.0030.01015.75
7.1.300.0060.00615.87
7.1.290.0080.00615.69
7.1.280.0060.01015.73
7.1.270.0070.00715.50
7.1.260.0060.00915.93
7.1.250.0100.00815.57
7.1.240.0050.00715.78
7.1.230.0060.00415.65
7.1.220.0060.00615.73
7.1.210.0080.00615.55
7.1.200.0050.00615.59
7.1.190.0050.00715.58
7.1.180.0100.00415.70
7.1.170.0030.00815.57
7.1.160.0090.00315.78
7.1.150.0050.00815.45
7.1.140.0000.00815.56
7.1.130.0050.00715.72
7.1.120.0040.00815.52
7.1.110.0050.00815.71
7.1.100.0050.00816.52
7.1.90.0060.00615.68
7.1.80.0090.00615.48
7.1.70.0030.00816.21
7.1.60.0090.00616.97
7.1.50.0070.00916.12
7.1.40.0050.00915.61
7.1.30.0050.00615.57
7.1.20.0050.00815.73
7.1.10.0050.00615.64
7.1.00.0070.02918.00
7.0.330.0100.00415.31
7.0.320.0080.00315.12
7.0.310.0060.00315.37
7.0.300.0060.00615.20
7.0.290.0050.00715.36
7.0.280.0040.00815.21
7.0.270.0060.00815.32
7.0.260.0040.00915.20
7.0.250.0040.01115.35
7.0.240.0040.00815.46
7.0.230.0120.00115.38
7.0.220.0060.00715.30
7.0.210.0030.00715.22
7.0.200.0050.00715.79
7.0.190.0070.00815.21
7.0.180.0040.00515.33
7.0.170.0090.00415.14
7.0.160.0070.00315.38
7.0.150.0020.01215.34
7.0.140.0020.03117.38
7.0.130.0080.00515.37
7.0.120.0060.00815.32
7.0.110.0030.01015.40
7.0.100.0050.01015.28
7.0.90.0070.00515.31
7.0.80.0040.01015.24
7.0.70.0060.00315.29
7.0.60.0050.03116.94
7.0.50.0060.02216.24
7.0.40.0070.01715.70
7.0.30.0130.02815.61
7.0.20.0140.03015.73
7.0.10.0070.01715.51
7.0.00.0100.01615.50
5.6.400.0040.01114.45
5.6.390.0030.00914.49
5.6.380.0050.00914.29
5.6.370.0090.00914.32
5.6.360.0090.00514.42
5.6.350.0050.00714.63
5.6.340.0030.00714.45
5.6.330.0070.00514.61
5.6.320.0050.00414.34
5.6.310.0050.00914.18
5.6.300.0020.00914.58
5.6.290.0050.00714.37
5.6.280.0030.03116.63
5.6.270.0070.00714.39
5.6.260.0070.00914.32
5.6.250.0050.00514.26
5.6.240.0060.00514.52
5.6.230.0070.00514.40
5.6.220.0020.01114.40
5.6.210.0100.02716.49
5.6.200.0080.03315.55
5.6.190.0070.01816.34
5.6.180.0130.01816.29
5.6.170.0140.02216.36
5.6.160.0080.03116.44
5.6.150.0050.03215.60
5.6.140.0070.02815.58
5.6.130.0050.01815.54
5.6.120.0060.03516.50
5.6.110.0100.02616.68
5.6.100.0110.03016.53
5.6.90.0100.02016.40
5.6.80.0040.01616.04
5.6.70.0070.00714.21
5.6.60.0030.00914.19
5.6.50.0050.00714.37
5.6.40.0060.00814.45
5.6.30.0080.00514.23
5.6.20.0060.00614.25
5.6.10.0060.00714.14
5.6.00.0100.00214.33
5.5.380.0030.00912.64
5.5.370.0020.01012.94
5.5.360.0080.00512.88
5.5.350.0120.03415.38
5.5.340.0080.02914.42
5.5.330.0030.03315.21
5.5.320.0150.01915.25
5.5.310.0180.02815.41
5.5.300.0040.02514.55
5.5.290.0070.02714.46
5.5.280.0110.02415.40
5.5.270.0060.03415.37
5.5.260.0080.02915.39
5.5.250.0010.03515.28
5.5.240.1290.01615.04
5.5.230.0070.00312.67
5.5.220.0080.00512.47
5.5.210.0020.01012.72
5.5.200.0080.00512.62
5.5.190.0090.00412.66
5.5.180.0050.00712.57
5.5.170.0050.00712.83
5.5.160.0050.00612.72
5.5.150.0020.01212.76
5.5.140.0100.00312.48
5.5.130.0020.00712.59
5.5.120.0110.00412.60
5.5.110.0060.00612.66
5.5.100.0040.00612.57
5.5.90.0020.00812.76
5.5.80.0060.00712.66
5.5.70.0070.00712.54
5.5.60.0030.00712.76
5.5.50.0020.01012.71
5.5.40.0050.00912.73
5.5.30.0060.00512.59
5.5.20.0030.00812.54
5.5.10.0020.00812.86
5.5.00.0050.00912.59
5.4.450.0100.02414.11
5.4.440.0060.02513.88
5.4.430.0100.02113.92
5.4.420.0050.02413.93
5.4.410.0080.02214.01
5.4.400.0090.02113.84
5.4.390.0080.02513.80
5.4.380.0120.02013.62
5.4.370.0130.02413.64
5.4.360.0040.02413.43
5.4.350.0020.02713.66
5.4.340.0090.02013.77
5.4.330.0040.00511.02
5.4.320.0050.02011.56
5.4.310.0060.01611.49
5.4.300.0050.01711.40
5.4.290.0050.01811.61
5.4.280.0030.02011.50
5.4.270.0060.01711.61
5.4.260.0040.02111.55
5.4.250.0070.01911.40
5.4.240.0070.01611.41
5.4.230.0040.01711.49
5.4.220.0060.01911.48
5.4.210.0050.02211.59
5.4.200.0100.02211.48
5.4.190.0070.02011.55
5.4.180.0030.01911.57
5.4.170.0050.01511.51
5.4.160.0040.01811.44
5.4.150.0040.01811.54
5.4.140.0080.01211.30
5.4.130.0060.01611.33
5.4.120.0060.01711.43
5.4.110.0030.01811.42
5.4.100.0050.01511.33
5.4.90.0050.01611.39
5.4.80.0040.01711.19
5.4.70.0070.01511.42
5.4.60.0040.01611.40
5.4.50.0050.01611.46
5.4.40.0050.01611.35
5.4.30.0050.01511.43
5.4.20.0060.01411.40
5.4.10.0050.01611.44
5.4.00.0070.01411.22
5.3.290.0030.01911.36
5.3.280.0060.02011.27
5.3.270.0040.01811.37
5.3.260.0030.01811.18
5.3.250.0050.01711.39
5.3.240.0060.01511.18
5.3.230.0060.01711.32
5.3.220.0070.01611.26
5.3.210.0020.01911.25
5.3.200.0050.01611.20
5.3.190.0020.01911.26
5.3.180.0050.01711.41
5.3.170.0060.01411.41
5.3.160.0050.01611.41
5.3.150.0070.01511.32
5.3.140.0060.01511.34
5.3.130.0040.02011.36
5.3.120.0080.01511.33
5.3.110.0050.01611.26
5.3.100.0040.01611.08
5.3.90.0030.01711.10
5.3.80.0030.01810.98
5.3.70.0020.02011.09
5.3.60.0050.01710.96
5.3.50.0040.01711.13
5.3.40.0060.01411.06
5.3.30.0030.01811.06
5.3.20.0030.01810.98
5.3.10.0030.01910.73
5.3.00.0050.01510.72
5.2.170.0040.0199.28
5.2.160.0010.0219.42
5.2.150.0020.0199.34
5.2.140.0070.0169.39
5.2.130.0020.0209.37
5.2.120.0040.0179.37
5.2.110.0060.0169.38
5.2.100.0060.0189.36
5.2.90.0040.0159.24
5.2.80.0020.0199.37
5.2.70.0060.0179.24
5.2.60.0060.0169.32
5.2.50.0070.0169.25
5.2.40.0030.0199.29
5.2.30.0060.0169.27
5.2.20.0040.0169.24
5.2.10.0060.0189.14
5.2.00.0050.0198.90
5.1.60.0020.0188.33
5.1.50.0050.0148.32
5.1.40.0040.0148.36
5.1.30.0040.0158.61
5.1.20.0030.0158.47
5.1.10.0040.0188.41
5.1.00.0040.0138.35
5.0.50.0030.0137.49
5.0.40.0050.0107.42
5.0.30.0020.0197.32
5.0.20.0030.0127.31
5.0.10.0030.0117.29
5.0.00.0030.0177.29
4.4.90.0010.0116.55
4.4.80.0060.0076.54
4.4.70.0020.0116.54
4.4.60.0040.0096.54
4.4.50.0020.0096.54
4.4.40.0030.0136.51
4.4.30.0020.0096.54
4.4.20.0020.0116.58
4.4.10.0020.0096.58
4.4.00.0030.0156.54
4.3.110.0020.0116.49
4.3.100.0030.0086.49
4.3.90.0010.0116.47
4.3.80.0040.0146.45
4.3.70.0040.0096.47
4.3.60.0020.0116.47
4.3.50.0040.0086.47
4.3.40.0040.0146.43
4.3.30.0030.0105.82
4.3.20.0020.0105.81
4.3.10.0010.0145.79
4.3.00.0020.0137.62

preferences:
44.1 ms | 401 KiB | 5 Q