3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr=[['a', 1, 3, 9, 0, 13],['b', 5, 6, 0, 0, 11],['j', 0, 6, 2, 1, 9],['c', 1, 0, 8, 5, 14],['d', 0, 0, 0, 17, 17],['e', 0, 5, 0, 0, 5],['h', 0, 0, 3, 3, 6]]; usort($arr,function($a,$b){ $infoa=array_count_values($a); $infob=array_count_values($b); if(empty($infoa[0])) $infoa[0]=0; if(empty($infob[0])) $infob[0]=0; if($infoa[0]==$infob[0]) { return end($a)-end($b); } else { return $infoa[0]-$infob[0]; } }); print_r($arr);

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.0190.00318.53
8.3.50.0140.00822.04
8.3.40.0150.00618.84
8.3.30.0070.00719.01
8.3.20.0040.00420.34
8.3.10.0040.00420.36
8.3.00.0080.00019.38
8.2.180.0160.00318.46
8.2.170.0030.01022.96
8.2.160.0080.00620.39
8.2.150.0060.00324.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0000.00722.27
8.2.110.0060.00319.17
8.2.100.0090.00317.93
8.2.90.0040.00419.22
8.2.80.0060.00317.97
8.2.70.0050.00317.50
8.2.60.0040.00417.93
8.2.50.0040.00418.10
8.2.40.0050.00317.92
8.2.30.0040.00417.82
8.2.20.0000.00717.75
8.2.10.0000.00818.21
8.2.00.0090.00017.84
8.1.280.0070.00725.92
8.1.270.0040.00422.25
8.1.260.0020.00526.35
8.1.250.0040.00428.09
8.1.240.0090.00021.37
8.1.230.0030.00917.83
8.1.220.0000.00817.74
8.1.210.0030.00518.77
8.1.200.0060.00317.22
8.1.190.0050.00317.35
8.1.180.0000.00818.10
8.1.170.0030.00518.54
8.1.160.0040.00419.04
8.1.150.0040.00418.79
8.1.140.0000.00717.43
8.1.130.0030.00317.75
8.1.120.0000.00717.35
8.1.110.0040.00417.52
8.1.100.0070.00017.49
8.1.90.0000.00717.51
8.1.80.0040.00417.44
8.1.70.0080.00017.33
8.1.60.0000.00917.56
8.1.50.0030.00617.57
8.1.40.0040.00417.42
8.1.30.0040.00417.61
8.1.20.0000.00817.57
8.1.10.0080.00017.57
8.1.00.0030.00517.45
8.0.300.0000.00718.77
8.0.290.0070.00016.75
8.0.280.0030.00318.50
8.0.270.0030.00618.00
8.0.260.0000.00617.12
8.0.250.0060.00016.97
8.0.240.0030.00316.89
8.0.230.0030.00316.89
8.0.220.0000.00616.81
8.0.210.0050.00316.73
8.0.200.0030.00316.97
8.0.190.0030.00616.96
8.0.180.0040.00416.94
8.0.170.0040.00417.01
8.0.160.0040.00416.80
8.0.150.0040.00416.75
8.0.140.0050.00316.89
8.0.130.0000.00613.27
8.0.120.0030.00616.86
8.0.110.0000.00816.93
8.0.100.0050.00216.70
8.0.90.0020.00516.75
8.0.80.0120.00416.96
8.0.70.0040.00417.02
8.0.60.0040.00416.77
8.0.50.0000.00716.78
8.0.30.0160.00616.91
8.0.20.0100.01017.40
8.0.10.0030.00717.03
8.0.00.0120.00516.71
7.4.330.0000.00515.05
7.4.320.0030.00316.64
7.4.300.0000.00616.51
7.4.290.0070.00016.66
7.4.280.0070.00016.63
7.4.270.0000.00816.52
7.4.260.0040.00416.51
7.4.250.0070.00016.57
7.4.240.0010.00616.54
7.4.230.0030.00316.71
7.4.220.0070.01116.55
7.4.210.0110.00816.56
7.4.200.0030.00316.70
7.4.160.0080.01216.68
7.4.150.0030.01617.40
7.4.140.0100.00717.86
7.4.130.0100.00916.52
7.4.120.0140.00616.47
7.4.110.0130.00316.55
7.4.100.0060.01116.54
7.4.90.0120.00616.60
7.4.80.0100.01019.37
7.4.70.0030.01216.46
7.4.60.0030.01316.52
7.4.50.0050.00016.43
7.4.40.0110.00616.24
7.4.30.0100.00716.36
7.4.00.0070.00714.97
7.3.330.0000.00513.34
7.3.320.0000.00613.25
7.3.310.0000.00816.25
7.3.300.0040.00416.25
7.3.290.0130.00016.27
7.3.280.0070.00816.31
7.3.270.0180.00617.40
7.3.260.0150.01116.55
7.3.250.0090.00916.46
7.3.240.0160.00016.59
7.3.230.0100.00716.54
7.3.210.0140.00716.33
7.3.200.0070.01419.39
7.3.190.0110.00816.40
7.3.180.0100.00616.37
7.3.170.0070.01016.39
7.3.160.0100.00616.46
7.3.120.0000.01714.72
7.3.110.0030.01414.88
7.3.100.0060.00614.80
7.3.90.0040.00414.72
7.3.80.0070.01014.81
7.3.70.0030.01314.87
7.3.60.0070.01114.79
7.3.50.0000.01214.80
7.3.40.0100.00314.86
7.3.30.0000.00814.68
7.3.20.0040.01116.58
7.3.10.0030.01216.34
7.3.00.0070.01016.59
7.2.330.0100.00716.46
7.2.320.0160.00316.75
7.2.310.0040.01916.45
7.2.300.0090.00916.84
7.2.290.0080.00816.77
7.2.250.0070.01015.25
7.2.240.0000.01815.27
7.2.230.0100.00715.32
7.2.220.0030.00615.13
7.2.210.0100.00615.00
7.2.200.0070.00715.21
7.2.190.0100.00714.95
7.2.180.0030.00715.10
7.2.170.0030.01214.95
7.2.60.0340.00716.97
7.2.50.0140.00016.93
7.1.330.0000.01315.91
7.1.320.0100.00315.80
7.1.310.0030.00715.55
7.1.300.0130.00315.61
7.1.290.0000.01315.79
7.1.280.0120.00015.45
7.1.270.0070.00715.97
7.1.260.0110.00416.02
7.1.200.0030.01015.82
7.1.70.0030.00617.20
7.1.60.0140.01119.32
7.1.50.0090.01316.69
7.1.00.0000.07722.51
7.0.200.0050.00316.71
7.0.140.0000.07321.92
7.0.100.0070.08319.94
7.0.90.0100.08719.86
7.0.80.0100.05019.98
7.0.70.0030.08019.87
7.0.60.0200.07319.99
7.0.50.0000.09720.39
7.0.40.0100.07720.06
7.0.30.0100.08320.11
7.0.20.0070.08320.09
7.0.10.0170.07020.05
7.0.00.0100.07720.00
5.6.280.0030.07320.86
5.6.250.0070.08720.61
5.6.240.0200.07020.67
5.6.230.0130.04020.51
5.6.220.0100.07320.68
5.6.210.0130.08320.77
5.6.200.0200.07021.12
5.6.190.0100.07721.04
5.6.180.0070.06321.05
5.6.170.0100.07321.13
5.6.160.0100.04721.11
5.6.150.0130.07721.03
5.6.140.0130.07021.05
5.6.130.0070.09021.03
5.6.120.0100.06720.96
5.6.110.0030.04321.16
5.6.100.0070.04020.99
5.6.90.0070.04021.15
5.6.80.0000.04320.41
5.6.70.0000.05720.43
5.6.60.0000.05020.39
5.6.50.0100.07020.44
5.6.40.0100.03320.44
5.6.30.0070.04720.50
5.6.20.0000.04020.41
5.6.10.0030.04320.38
5.6.00.0030.04020.48
5.5.380.0070.08020.46
5.5.370.0130.07720.40
5.5.360.0130.08020.45
5.5.350.0100.08320.40
5.5.340.0070.07320.90
5.5.330.0070.08720.89
5.5.320.0070.08320.86
5.5.310.0070.08020.80
5.5.300.0030.08320.87
5.5.290.0030.08320.87
5.5.280.0130.06020.92
5.5.270.0100.07320.80
5.5.260.0000.04720.91
5.5.250.0030.04320.59
5.5.240.0000.04320.29
5.5.230.0200.03320.17
5.5.220.0030.04320.26
5.5.210.0070.03720.28
5.5.200.0130.03320.15
5.5.190.0000.04019.99
5.5.180.0070.04320.18
5.5.160.0030.06020.26
5.5.150.0070.04020.11
5.5.140.0030.04020.22
5.5.130.0030.04020.27
5.5.120.0130.03020.25
5.5.110.0030.04720.21
5.5.100.0030.04019.95
5.5.90.0070.04320.05
5.5.80.0000.04720.16
5.5.70.0070.07020.12
5.5.60.0100.03320.06
5.5.50.0030.04020.16
5.5.40.0000.04720.09
5.5.30.0100.03020.15
5.5.20.0030.04020.15
5.5.10.0100.04020.00
5.5.00.0070.07020.03
5.4.450.0170.04319.58
5.4.440.0130.08319.23
5.4.430.0030.06719.53
5.4.420.0070.03719.37
5.4.410.0130.03719.37
5.4.400.0000.04019.17
5.4.390.0030.03718.86
5.4.380.0130.06719.18
5.4.370.0100.06719.05
5.4.360.0130.07719.18
5.4.350.0000.03719.18
5.4.340.0000.04319.22
5.4.320.0070.03719.23
5.4.310.0000.04019.03
5.4.300.0100.03019.08
5.4.290.0100.03718.90
5.4.280.0030.03719.12
5.4.270.0100.03319.27
5.4.260.0070.03018.90
5.4.250.0130.03319.20
5.4.240.0030.06019.12
5.4.230.0000.04018.94
5.4.220.0000.04019.04
5.4.210.0070.04318.87
5.4.200.0030.05019.17
5.4.190.0070.04018.89
5.4.180.0070.07319.13
5.4.170.0030.03318.89
5.4.160.0070.07319.01
5.4.150.0100.07319.18
5.4.140.0100.07016.35
5.4.130.0130.06716.45
5.4.120.0130.06316.45
5.4.110.0070.06316.50
5.4.100.0070.07316.49
5.4.90.0130.06716.50
5.4.80.0030.08316.49
5.4.70.0000.07716.38
5.4.60.0100.06716.26
5.4.50.0100.07016.27
5.4.40.0070.07316.37
5.4.30.0100.07016.46
5.4.20.0130.06016.36
5.4.10.0300.02716.48
5.4.00.0070.07015.77
5.3.290.0030.03314.64
5.3.280.0070.03314.55
5.3.270.0030.03714.59
5.3.260.0070.03714.61
5.3.250.0130.07314.46
5.3.240.0100.06714.58
5.3.230.0200.06314.52
5.3.220.0070.07014.40
5.3.210.0030.08014.55
5.3.200.0070.07314.57
5.3.190.0100.07314.53
5.3.180.0070.07714.52
5.3.170.0100.06714.48
5.3.160.0100.06314.42
5.3.150.0130.07014.42
5.3.140.0130.06014.52
5.3.130.0130.06314.41
5.3.120.0070.06714.46
5.3.110.0070.04714.53
5.3.100.0100.05713.96
5.3.90.0030.04013.93
5.3.80.0070.06314.00
5.3.70.0030.06714.01
5.3.60.0100.07313.85
5.3.50.0070.06713.89
5.3.40.0130.07013.85
5.3.30.0130.05713.89
5.3.20.0070.06713.85
5.3.10.0070.07313.85
5.3.00.0100.05013.85
5.2.170.0070.03713.85
5.2.160.0030.06313.85
5.2.150.0100.06013.85
5.2.140.0030.03713.85
5.2.130.0070.06013.85
5.2.120.0030.06013.85
5.2.110.0030.05313.85
5.2.100.0030.03713.85
5.2.90.0030.03013.85
5.2.80.0070.06713.85
5.2.70.0030.04013.85
5.2.60.0100.06013.85
5.2.50.0100.05013.85
5.2.40.0030.05713.85
5.2.30.0030.05313.85
5.2.20.0100.04013.85
5.2.10.0000.04713.85
5.2.00.0030.05313.85
5.1.60.0000.04313.85
5.1.50.0070.05013.85
5.1.40.0100.04013.85
5.1.30.0000.06013.85
5.1.20.0030.06313.85
5.1.10.0030.04313.85
5.1.00.0070.03313.85
5.0.50.0070.03713.85
5.0.40.0000.05013.85
5.0.30.0030.06013.85
5.0.20.0000.02713.85
5.0.10.0000.03313.85
5.0.00.0070.05713.85
4.4.90.0070.02713.85
4.4.80.0070.03313.85
4.4.70.0070.02713.85
4.4.60.0030.03313.85
4.4.50.0030.03313.85
4.4.40.0000.05313.85
4.4.30.0030.02713.85
4.4.20.0030.04013.85
4.4.10.0030.02013.85
4.4.00.0070.04313.85
4.3.110.0070.03013.85
4.3.100.0000.03013.85
4.3.90.0030.03313.85
4.3.80.0000.03013.85
4.3.70.0030.01713.85
4.3.60.0000.02713.85
4.3.50.0070.01313.85
4.3.40.0000.03313.85
4.3.30.0000.02013.85
4.3.20.0030.01713.85
4.3.10.0000.02713.85
4.3.00.0000.02313.85

preferences:
46.7 ms | 401 KiB | 5 Q