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' => 3, '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.60.0070.01416.48
8.3.50.0150.00322.05
8.3.40.0110.01118.92
8.3.30.0070.00719.27
8.3.20.0040.00420.21
8.3.10.0040.00423.52
8.3.00.0040.00419.26
8.2.180.0070.01616.50
8.2.170.0090.00622.96
8.2.160.0070.01120.47
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0000.00822.11
8.2.110.0090.00022.25
8.2.100.0080.00417.84
8.2.90.0030.00619.21
8.2.80.0000.00817.97
8.2.70.0060.00317.62
8.2.60.0030.00918.05
8.2.50.0050.00318.07
8.2.40.0040.00419.95
8.2.30.0050.00218.10
8.2.20.0000.00817.83
8.2.10.0090.00019.93
8.2.00.0050.00217.76
8.1.280.0110.00325.92
8.1.270.0030.00622.02
8.1.260.0030.00626.35
8.1.250.0030.00528.09
8.1.240.0030.00623.96
8.1.230.0060.00619.04
8.1.220.0040.00417.78
8.1.210.0030.00618.77
8.1.200.0030.00717.36
8.1.190.0040.00417.52
8.1.180.0030.00718.10
8.1.170.0040.00418.65
8.1.160.0040.00421.96
8.1.150.0000.00918.71
8.1.140.0030.00517.50
8.1.130.0030.00317.86
8.1.120.0020.00517.55
8.1.110.0060.00317.52
8.1.100.0040.00417.49
8.1.90.0040.00417.38
8.1.80.0000.00817.37
8.1.70.0000.00717.46
8.1.60.0000.00817.51
8.1.50.0030.00617.55
8.1.40.0030.00517.55
8.1.30.0030.00617.56
8.1.20.0040.00417.73
8.1.10.0060.00317.66
8.1.00.0030.00517.50
8.0.300.0040.00419.28
8.0.290.0000.00717.18
8.0.280.0070.00018.48
8.0.270.0000.00717.29
8.0.260.0000.00717.29
8.0.250.0000.00816.87
8.0.240.0030.00316.90
8.0.230.0000.00716.96
8.0.220.0000.00716.92
8.0.210.0030.00316.94
8.0.200.0030.00316.88
8.0.190.0040.00417.03
8.0.180.0000.00816.85
8.0.170.0040.00416.82
8.0.160.0000.00716.99
8.0.150.0040.00416.94
8.0.140.0070.00016.84
8.0.130.0000.00613.42
8.0.120.0040.00416.80
8.0.110.0050.00216.91
8.0.100.0040.00416.75
8.0.90.0000.00816.96
8.0.80.0060.01016.98
8.0.70.0000.00716.94
8.0.60.0080.00016.93
8.0.50.0000.00816.99
8.0.30.0110.01116.93
8.0.20.0080.01517.40
8.0.10.0000.00816.92
8.0.00.0100.00916.88
7.4.330.0030.00315.09
7.4.320.0000.00716.49
7.4.300.0000.00716.44
7.4.290.0000.00816.57
7.4.280.0080.00016.63
7.4.270.0030.00416.50
7.4.260.0070.00016.54
7.4.250.0040.00416.63
7.4.240.0030.00516.50
7.4.230.0050.00316.65
7.4.220.0030.01516.46
7.4.210.0060.00816.74
7.4.200.0000.00716.43
7.4.190.0000.00816.71
7.4.160.0060.01216.36
7.4.150.0100.01317.40
7.4.140.0090.01217.86
7.4.130.0100.01216.41
7.4.120.0110.01016.53
7.4.110.0070.01116.59
7.4.100.0060.01316.54
7.4.90.0090.01316.65
7.4.80.0150.00619.39
7.4.70.0130.00616.45
7.4.60.0080.01216.55
7.4.50.0030.00616.22
7.4.40.0150.00416.35
7.4.30.0000.01716.44
7.4.00.0080.00815.07
7.3.330.0030.00313.26
7.3.320.0030.00313.24
7.3.310.0000.00716.37
7.3.300.0070.00016.50
7.3.290.0110.00916.51
7.3.280.0110.00816.40
7.3.270.0150.00417.40
7.3.260.0170.00316.59
7.3.250.0090.01116.42
7.3.240.0040.01816.57
7.3.230.0070.01016.55
7.3.210.0160.00516.37
7.3.200.0090.01219.39
7.3.190.0140.00916.67
7.3.180.0130.00616.23
7.3.170.0180.00316.66
7.3.160.0040.01516.61
7.3.120.0070.01114.97
7.3.110.0030.00714.84
7.3.100.0090.00314.75
7.3.90.0070.00414.94
7.3.80.0030.00614.99
7.3.70.0060.00614.99
7.3.60.0090.00615.03
7.3.50.0080.00315.06
7.3.40.0070.00715.09
7.3.30.0070.00714.95
7.3.20.0000.01716.57
7.3.10.0160.00716.71
7.3.00.0280.00316.50
7.2.330.0130.00716.57
7.2.320.0150.00616.78
7.2.310.0160.00316.91
7.2.300.0060.01216.49
7.2.290.0080.00816.66
7.2.250.0070.01315.04
7.2.240.0060.01315.12
7.2.230.0090.00415.32
7.2.220.0040.01115.18
7.2.210.0070.00715.01
7.2.200.0090.00914.81
7.2.190.0030.01014.93
7.2.180.0100.00315.07
7.2.170.0110.00015.18
7.2.130.0430.00716.83
7.2.120.0140.00316.84
7.2.110.0150.00617.04
7.2.100.0090.00616.61
7.2.90.0080.00416.73
7.2.80.0030.01016.51
7.2.70.0080.00816.78
7.2.60.0080.00716.93
7.2.50.0110.01016.84
7.2.40.0060.00716.69
7.2.30.0110.00816.82
7.2.20.0110.00816.77
7.2.10.0080.00616.85
7.2.00.0050.01017.70
7.1.330.0060.00915.59
7.1.320.0070.01016.08
7.1.310.0070.00315.88
7.1.300.0000.01615.83
7.1.290.0110.00315.98
7.1.280.0130.00015.57
7.1.270.0070.00415.82
7.1.260.0100.00715.86
7.1.250.0200.00715.69
7.1.200.0040.00815.54
7.1.100.0070.00718.27
7.1.70.0030.00716.93
7.1.60.0090.01619.46
7.1.50.0070.01717.04
7.1.00.0000.07722.48
7.0.200.0030.00716.55
7.0.140.0070.07022.12
7.0.60.0170.07319.82
7.0.50.0000.08717.89
7.0.40.0130.07020.40
7.0.30.0300.07720.16
7.0.20.0270.07720.07
7.0.10.0100.08720.24
7.0.00.0130.08020.15
5.6.280.0030.07320.91
5.6.210.0230.07020.73
5.6.200.0170.07318.19
5.6.190.0100.05720.64
5.6.180.0200.08320.61
5.6.170.0230.05020.51
5.6.160.0070.03720.50
5.6.150.0170.06018.18
5.6.140.0100.07718.23
5.6.130.0170.07718.11
5.6.120.0100.03721.14
5.6.110.0070.08021.03
5.6.100.0070.03721.12
5.6.90.0230.07320.98
5.6.80.0130.07720.37
5.5.350.0230.05720.34
5.5.340.0000.04717.96
5.5.330.0070.08320.29
5.5.320.0330.04020.30
5.5.310.0330.07320.39
5.5.300.0030.04017.94
5.5.290.0130.07318.06
5.5.280.0070.07320.81
5.5.270.0100.04320.77
5.5.260.0070.08320.88
5.5.250.0000.04720.63
5.5.240.0070.08020.36
5.4.450.0230.05319.48
5.4.440.0200.05319.56
5.4.430.0270.06019.58
5.4.420.0230.08019.30
5.4.410.0270.06719.34
5.4.400.0200.05019.15
5.4.390.0130.05719.15
5.4.380.0170.05018.78
5.4.370.0100.05718.75
5.4.360.0230.04018.76
5.4.350.0130.05318.51
5.4.340.0100.05718.80
5.4.320.0040.03912.51
5.4.310.0050.04112.51
5.4.300.0080.03712.51
5.4.290.0090.05912.50
5.4.280.0120.04512.39
5.4.270.0070.04212.39
5.4.260.0080.04712.39
5.4.250.0110.05912.39
5.4.240.0100.03712.39
5.4.230.0060.03912.38
5.4.220.0080.03612.38
5.4.210.0080.03612.38
5.4.200.0120.04812.38
5.4.190.0280.09212.38
5.4.180.0100.05012.38
5.4.170.0080.05412.39
5.4.160.0060.04012.39
5.4.150.0070.03712.38
5.4.140.0070.03912.06
5.4.130.0060.03912.05
5.4.120.0060.04312.01
5.4.110.0090.03912.01
5.4.100.0100.05712.00
5.4.90.0080.05212.01
5.4.80.0100.04812.00
5.4.70.0070.04912.00
5.4.60.0130.04312.00
5.4.50.0100.05112.00
5.4.40.0080.04711.99
5.4.30.0120.06611.99
5.4.20.0210.05811.99
5.4.10.0080.05111.99
5.4.00.0110.05511.47
5.3.290.0030.04312.80
5.3.280.0120.04412.71
5.3.270.0100.04712.72
5.3.260.0120.06712.72
5.3.250.0060.04112.72
5.3.240.0120.04212.72
5.3.230.0080.03912.71
5.3.220.0080.03912.68
5.3.210.0030.04612.68
5.3.200.0110.04112.68
5.3.190.0100.03912.68
5.3.180.0080.03512.68
5.3.170.0080.03812.66
5.3.160.0080.04312.67
5.3.150.0090.05112.68
5.3.140.0100.05712.66
5.3.130.0150.05112.66
5.3.120.0070.06112.66
5.3.110.0190.07512.66
5.3.100.0090.05912.13
5.3.90.0110.06112.11
5.3.80.0110.05512.10
5.3.70.0060.05212.09
5.3.60.0100.03912.09
5.3.50.0070.03512.03
5.3.40.0140.02912.03
5.3.30.0100.04911.99
5.3.20.0050.04911.79
5.3.10.0080.03411.73
5.3.00.0080.03511.72
5.2.170.0070.0299.23
5.2.160.0080.0289.23
5.2.150.0060.0449.23
5.2.140.0090.0429.23
5.2.130.0060.0439.19
5.2.120.0030.0469.18
5.2.110.0070.0409.19
5.2.100.0080.0419.18
5.2.90.0100.0429.18
5.2.80.0060.0499.18
5.2.70.0090.0319.18
5.2.60.0060.0369.14
5.2.50.0060.0319.11
5.2.40.0060.0299.09
5.2.30.0060.0309.05
5.2.20.0080.0399.05
5.2.10.0060.0398.95
5.2.00.0020.0458.82
5.1.60.0120.0378.10
5.1.50.0040.0398.10
5.1.40.0040.0418.08
5.1.30.0060.0418.43
5.1.20.0090.0378.45
5.1.10.0040.0298.18
5.1.00.0060.0278.17
5.0.50.0060.0266.66
5.0.40.0060.0286.52
5.0.30.0030.0446.33
5.0.20.0070.0216.30
5.0.10.0030.0206.28
5.0.00.0060.0286.28
4.4.90.0030.0164.78
4.4.80.0020.0184.76
4.4.70.0040.0154.75
4.4.60.0060.0174.76
4.4.50.0050.0214.77
4.4.40.0040.0374.71
4.4.30.0020.0264.76
4.4.20.0020.0334.84
4.4.10.0040.0274.85
4.4.00.0060.0364.76
4.3.110.0090.0564.67
4.3.100.0050.0364.66
4.3.90.0030.0234.63
4.3.80.0050.0324.58
4.3.70.0030.0214.63
4.3.60.0020.0174.63
4.3.50.0050.0164.63
4.3.40.0030.0274.54
4.3.30.0030.0183.32
4.3.20.0040.0173.30
4.3.10.0040.0153.26
4.3.00.0130.0176.93

preferences:
56.06 ms | 401 KiB | 5 Q