3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = ['a', 'e', 'b', 'c', 'c', 'c', 'e', 'd', 'a', 'b', 'b', 'b', 'b', 'e']; $counts = array_count_values($array); arsort($counts); usort($array, fn($a, $b) => [$counts[$b], $a] <=> [$counts[$a], $b]); var_export($array);

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.5.70.0110.00616.70
8.5.60.0100.00716.66
8.5.50.0090.00416.73
8.5.30.0080.01021.33
8.5.20.0060.01119.50
8.5.10.0110.00620.05
8.5.00.0120.01120.04
8.4.220.0110.01119.46
8.4.210.0100.01119.65
8.4.180.0110.00921.92
8.4.170.0120.00919.59
8.4.160.0120.00923.82
8.4.150.0090.00416.83
8.4.140.0140.00817.72
8.4.130.0130.00917.48
8.4.120.0120.00724.15
8.4.110.0130.00718.95
8.4.100.0140.00318.84
8.4.90.0090.01020.49
8.4.80.0060.00518.74
8.4.70.0100.00918.99
8.4.60.0050.00318.87
8.4.50.0070.00218.03
8.4.40.0130.00619.61
8.4.30.0100.00620.83
8.4.20.0160.00018.13
8.4.10.0090.00322.09
8.3.310.0140.00518.62
8.3.300.0100.01020.48
8.3.290.0120.00918.50
8.3.280.0080.00416.32
8.3.270.0100.01216.48
8.3.260.0060.00916.64
8.3.250.0110.00817.07
8.3.240.0070.00617.30
8.3.230.0060.00216.62
8.3.220.0130.00518.80
8.3.210.0080.00918.56
8.3.200.0040.00516.73
8.3.190.0080.01116.49
8.3.180.0110.00916.50
8.3.170.0090.00017.06
8.3.160.0040.00416.57
8.3.150.0040.01417.34
8.3.140.0060.00619.13
8.3.130.0160.00318.37
8.3.120.0000.00818.86
8.3.110.0040.00418.43
8.3.100.0030.00524.06
8.3.90.0050.00326.77
8.3.80.0060.00318.56
8.3.70.0040.01118.18
8.3.60.0000.01416.61
8.3.50.0180.00320.10
8.3.40.0060.00920.21
8.3.30.0060.01018.73
8.3.20.0060.00324.18
8.3.10.0070.00024.66
8.3.00.0040.00426.16
8.2.310.0090.01118.19
8.2.300.0110.01018.18
8.2.290.0100.00820.54
8.2.280.0100.00916.70
8.2.270.0090.00916.47
8.2.260.0040.01418.79
8.2.250.0030.00616.68
8.2.240.0030.00617.18
8.2.230.0030.00620.94
8.2.220.0080.00037.54
8.2.210.0040.00426.77
8.2.200.0030.00616.75
8.2.190.0030.01716.88
8.2.180.0150.00025.92
8.2.170.0090.00919.09
8.2.160.0070.00722.96
8.2.150.0070.00025.66
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0000.00726.16
8.2.110.0000.00820.38
8.2.100.0070.00717.91
8.2.90.0030.00619.28
8.2.80.0030.00618.05
8.2.70.0060.00317.63
8.2.60.0000.00717.93
8.2.50.0080.00418.07
8.2.40.0050.00319.83
8.2.30.0040.00418.12
8.2.20.0080.00019.39
8.2.10.0050.00218.01
8.2.00.0040.00419.29
8.1.340.0130.00717.79
8.1.330.0050.00422.25
8.1.320.0130.00816.46
8.1.310.0040.00416.67
8.1.300.0060.00318.25
8.1.290.0080.00330.84
8.1.280.0130.01025.92
8.1.270.0070.01124.66
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0040.00723.86
8.1.230.0040.00823.93
8.1.220.0030.00617.78
8.1.210.0040.00418.77
8.1.200.0040.00417.35
8.1.190.0050.00317.22
8.1.180.0040.00418.10
8.1.170.0000.00818.50
8.1.160.0070.00018.84
8.1.150.0050.00218.64
8.1.140.0000.00817.48
8.1.130.0040.00420.66
8.1.120.0040.00417.46
8.1.110.0000.00917.34
8.1.100.0100.00617.52
8.1.90.0110.00517.41
8.1.80.0160.00017.32
8.1.70.0090.00617.29
8.1.60.0130.00517.51
8.1.50.0140.00317.53
8.1.40.0100.00717.44
8.1.30.0130.00317.55
8.1.20.0190.00017.56
8.1.10.0070.01117.59
8.1.00.0150.00317.44
8.0.300.0060.00318.77
8.0.290.0000.00716.75
8.0.280.0050.00318.50
8.0.270.0040.00418.00
8.0.260.0060.00018.45
8.0.250.0000.00717.02
8.0.240.0050.00516.92
8.0.230.0060.00917.00
8.0.220.0070.00816.82
8.0.210.0030.00916.83
8.0.200.0080.00816.91
8.0.190.0110.00416.79
8.0.180.0100.00516.94
8.0.170.0070.00716.88
8.0.160.0120.00316.94
8.0.150.0130.00216.77
8.0.140.0110.00616.87
8.0.130.0100.00516.67
8.0.120.0130.00316.95
8.0.110.0110.00416.88
8.0.100.0110.00416.79
8.0.90.0090.00616.83
8.0.80.0110.00416.74
8.0.70.0130.00316.73
8.0.60.0110.00416.70
8.0.50.0140.00016.76
8.0.30.0120.00316.75
8.0.20.0150.00016.93
8.0.10.0090.00617.02
7.4.330.0060.00015.55
7.4.320.0080.00016.47
7.4.300.0060.00316.59
7.4.290.0040.00416.59
7.4.280.0060.00316.57
7.4.270.0090.00716.64
7.4.260.0110.00316.50
7.4.250.0160.00016.62
7.4.240.0160.00016.49
7.4.230.0040.01316.48
7.4.220.0100.00516.61
7.4.210.0130.00016.51
7.4.200.0110.00416.56
7.4.190.0100.00516.55
7.4.180.0090.00516.63
7.4.160.0140.00016.63
7.4.150.0090.00416.35
7.4.140.0140.00016.46
7.4.130.0050.00916.38
7.4.120.0050.00916.54
7.4.110.0050.00916.35
7.4.100.0150.00016.46
7.4.90.0140.00016.52
7.4.80.0050.01016.29
7.4.70.0100.00516.41
7.4.60.0120.00216.45
7.4.50.0090.00416.34
7.4.40.0140.00016.25
7.4.30.0070.00716.54
7.4.20.0120.00416.32
7.4.10.0130.00416.34
7.4.00.0110.00316.48
7.0.310.0210.00425.92

preferences:
87.66 ms | 1299 KiB | 5 Q