3v4l.org

run code in 300+ PHP versions simultaneously
<?php //$array = ["05h", "02h", "03c", "02s", "04h"]; //$array = ["05h", "02h", "03c", "02s", "03h"]; $array = ["03s", "02h", "03c", "02s", "03h"]; foreach ($array as $v) { $num = (int) $v; $counts[$num] = ($counts[$num] ?? 0) + 1; $map[$v] =& $counts[$num]; } var_dump($map); usort($array, fn($a, $b) => $map[$b] <=> $map[$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.00.0160.00719.77
8.4.150.0030.00014.05
8.4.140.0090.01217.53
8.4.130.0080.00818.12
8.4.120.0150.00520.36
8.4.110.0100.01018.68
8.4.100.0130.00917.75
8.4.90.0110.01017.78
8.4.80.0060.00220.84
8.4.70.0040.00518.02
8.4.60.0090.00818.12
8.4.50.0050.00518.97
8.4.40.0040.00417.66
8.4.30.0400.00817.21
8.4.20.0430.00617.27
8.4.10.0380.01017.41
8.3.280.0140.00618.38
8.3.270.0110.00816.64
8.3.260.0110.00716.48
8.3.250.0140.00418.88
8.3.240.0080.01216.44
8.3.230.0130.00716.54
8.3.220.0130.00517.11
8.3.210.0070.01116.92
8.3.200.0140.00516.84
8.3.190.0100.00918.78
8.3.180.0100.01016.78
8.3.170.0090.00917.21
8.3.160.0430.00416.23
8.3.150.0430.00316.31
8.3.140.0380.00916.53
8.3.130.0300.01216.36
8.3.120.0360.00716.54
8.3.110.0210.01216.44
8.3.100.0310.00716.46
8.3.90.0360.00716.13
8.3.80.0390.00616.41
8.3.70.0390.00616.77
8.3.60.0290.01816.70
8.3.50.0480.00016.52
8.3.40.0240.01417.54
8.3.30.0400.00417.55
8.3.20.0340.00917.30
8.3.10.0330.00317.55
8.3.00.0150.01217.45
8.2.290.0110.00820.43
8.2.280.0120.00616.43
8.2.270.0300.00916.36
8.2.260.0270.01216.77
8.2.250.0310.00616.53
8.2.240.0240.01416.25
8.2.230.0380.00016.46
8.2.220.0280.01116.39
8.2.210.0310.00816.54
8.2.200.0310.00616.60
8.2.190.0260.01316.66
8.2.180.0280.00916.57
8.2.170.0300.01017.62
8.2.160.0180.02117.79
8.2.150.0350.00617.64
8.2.140.0310.00917.46
8.2.130.0290.01317.60
8.2.120.0290.01117.66
8.2.110.0410.00017.48
8.2.100.0310.00917.52
8.2.90.0320.00617.44
8.2.80.0380.00017.24
8.2.70.0410.00317.13
8.2.60.0290.00917.44
8.2.50.0290.01017.34
8.2.40.0200.01417.71
8.2.30.0300.00617.65
8.2.20.0320.00417.40
8.2.10.0290.01617.43
8.2.00.0450.00017.39
8.1.320.0090.01016.13

preferences:
30.38 ms | 403 KiB | 5 Q