3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = ['s', 'h', 'c', 'b', 'a', 'b', 'd', 'e', 'f', 'f', 'g']; $counts = array_count_values($array); $array = array_unique($array); usort($array, fn($a, $b) => $counts[$b] <=> $counts[$a]); 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.0050.00216.67
8.5.60.0090.00816.89
8.5.50.0050.00318.45
8.5.30.0080.01019.62
8.5.20.0070.01020.12
8.5.10.0090.00616.86
8.5.00.0160.00520.04
8.4.220.0130.00819.54
8.4.210.0040.00921.50
8.4.180.0130.00919.55
8.4.170.0150.00623.67
8.4.160.0150.00722.03
8.4.150.0080.00516.82
8.4.140.0110.01017.70
8.4.130.0160.00518.64
8.4.120.0120.00722.22
8.4.110.0100.00920.68
8.4.100.0100.00717.63
8.4.90.0120.00820.70
8.4.80.0080.01024.25
8.4.70.0100.00819.17
8.4.60.0080.00720.50
8.4.50.0090.01118.61
8.4.40.0110.01117.50
8.4.30.0140.00721.92
8.4.20.0060.00921.35
8.4.10.0150.00419.43
8.3.310.0060.00518.57
8.3.300.0100.01020.59
8.3.290.0120.00820.96
8.3.280.0100.01018.52
8.3.270.0110.00816.83
8.3.260.0130.00716.54
8.3.250.0100.00717.17
8.3.240.0100.00916.79
8.3.230.0130.00316.73
8.3.220.0040.00318.93
8.3.210.0030.00416.54
8.3.200.0060.00416.63
8.3.190.0040.00517.23
8.3.180.0100.00818.83
8.3.170.0140.00417.21
8.3.160.0060.01319.16
8.3.150.0120.00617.13
8.3.140.0030.00618.61
8.3.130.0140.00517.41
8.3.120.0140.00617.56
8.3.110.0140.00416.64
8.3.100.0150.00716.39
8.3.90.0150.00616.63
8.3.80.0150.00716.33
8.3.70.0200.00216.37
8.3.60.0190.00316.51
8.3.50.0130.00816.44
8.3.40.0170.00417.37
8.3.30.0130.00517.34
8.3.20.0170.00217.14
8.3.10.0160.00317.52
8.3.00.0110.00217.32
8.2.310.0060.01518.11
8.2.300.0120.00922.19
8.2.290.0050.00817.36
8.2.280.0130.00418.47
8.2.270.0120.00616.79
8.2.260.0090.00917.24
8.2.250.0070.00216.61
8.2.240.0120.00316.54
8.2.230.0140.00516.51
8.2.220.0140.00516.32
8.2.210.0150.00316.43
8.2.200.0140.00616.51
8.2.190.0170.00616.31
8.2.180.0150.00316.53
8.2.170.0150.00417.60
8.2.160.0130.00517.55
8.2.150.0160.00417.47
8.2.140.0130.00617.28
8.2.130.0170.00617.25
8.2.120.0160.00417.43
8.2.110.0190.00117.41
8.2.100.0150.00417.52
8.2.90.0220.00017.56
8.2.80.0150.00717.25
8.2.70.0240.00217.45
8.2.60.0210.00317.48
8.2.50.0190.00717.44
8.2.40.0240.00517.27
8.2.30.0180.01217.38
8.2.20.0190.00517.34
8.2.10.0290.00018.21
8.2.00.0280.00017.25
8.1.340.0140.00819.51
8.1.330.0130.00616.03
8.1.320.0040.00416.10
8.1.310.0060.01116.66
8.1.300.0210.00416.17
8.1.290.0200.00416.18
8.1.280.0180.00416.08
8.1.270.0180.00717.17
8.1.260.0180.00417.24
8.1.250.0180.00817.19
8.1.240.0140.01117.34
8.1.230.0180.00217.15
8.1.220.0170.00617.10
8.1.210.0210.00817.05
8.1.200.0210.00617.18
8.1.190.0150.00517.13
8.1.180.0160.00416.92
8.1.170.0160.00317.04
8.1.160.0150.00417.28
8.1.150.0150.00316.99
8.1.140.0130.00517.11
8.1.130.0120.00617.15
8.1.120.0140.00417.02
8.1.110.0100.00917.06
8.1.100.0120.00717.25
8.1.90.0120.00717.09
8.1.80.0160.00316.99
8.1.70.0170.00316.96
8.1.60.0220.00017.22
8.1.50.0140.00417.20
8.1.40.0160.00417.27
8.1.30.0170.00217.32
8.1.20.0170.00417.19
8.1.10.0160.00517.35
8.1.00.0180.00217.23

preferences:
49.91 ms | 1012 KiB | 5 Q