3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = 100; $end = 200; $step = 10; echo array_sum(range($start, $end, $step)); echo "\n---\n"; $factors = [2, 5]; $total = 0; for ($i = $start; $i <= $end; ++$i) { foreach ($factors as $f) { if ($i % $f !== 0) { continue 2; } } $total += $i; } echo $total;

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.0100.01119.99
8.4.150.0020.00014.05
8.4.140.0150.00617.44
8.4.130.0100.00917.67
8.4.120.0090.00820.55
8.4.110.0060.00218.88
8.4.100.0110.00817.57
8.4.90.0160.00517.65
8.4.80.0130.00717.60
8.4.70.0110.01117.96
8.4.60.0100.00718.92
8.4.50.0120.00718.60
8.4.40.0030.01717.69
8.4.30.0150.00318.71
8.4.20.0130.00617.72
8.4.10.0040.00419.32
8.3.280.0030.00014.05
8.3.270.0110.00916.47
8.3.260.0120.00816.59
8.3.250.0080.00818.89
8.3.240.0040.00416.66
8.3.230.0130.00616.80
8.3.220.0080.01116.80
8.3.210.0100.00916.48
8.3.200.0050.00416.38
8.3.190.0090.00717.08
8.3.180.0120.00616.64
8.3.170.0140.00720.55
8.3.160.0040.00417.33
8.3.150.0130.00617.22
8.3.140.0070.01116.53
8.3.130.0150.00018.49
8.3.120.0060.01318.98
8.3.110.0040.00420.94
8.3.100.0090.00024.06
8.3.90.0040.00826.77
8.3.80.0000.00918.56
8.3.70.0180.00316.63
8.3.60.0120.00918.67
8.3.50.0140.00716.69
8.3.40.0140.01023.65
8.3.30.0030.01220.43
8.3.20.0000.00724.18
8.3.10.0130.00921.63
8.3.00.0140.00520.41
8.2.290.0100.00818.76
8.2.280.0090.01118.10
8.2.270.0090.00919.10
8.2.260.0090.00020.67
8.2.250.0040.00416.61
8.2.240.0090.00917.17
8.2.230.0060.01322.58
8.2.220.0080.00037.54
8.2.210.0050.00326.77
8.2.200.0090.00318.16
8.2.190.0160.00616.63
8.2.180.0070.00716.32
8.2.170.0080.01118.67
8.2.160.0140.00322.96
8.2.150.0080.00025.66
8.2.140.0100.00720.34
8.2.130.0030.00620.53
8.2.120.0110.00318.97
8.2.110.0050.00919.13
8.2.100.0100.00320.48
8.2.90.0120.00618.78
8.2.80.0110.00419.04
8.2.70.0130.00318.67
8.2.60.0000.01618.83
8.2.50.0090.00318.95
8.2.40.0070.00418.94
8.2.30.0110.00420.38
8.2.20.0040.00918.76
8.2.10.0070.00718.52
8.2.00.0140.00018.58
8.1.330.0130.00615.91
8.1.320.0120.00716.28
8.1.310.0040.00416.45
8.1.300.0090.00017.73
8.1.290.0080.00318.88
8.1.280.0070.01525.92
8.1.270.0070.00321.80
8.1.260.0110.00022.01
8.1.250.0030.00722.20
8.1.240.0100.00318.63
8.1.230.0100.00318.40
8.1.220.0120.00018.81
8.1.210.0110.00418.25
8.1.200.0030.00918.80
8.1.190.0080.00518.42
8.1.180.0170.00020.07
8.1.170.0030.00718.61
8.1.160.0140.00018.50
8.1.150.0150.00020.21
8.1.140.0030.01018.41
8.1.130.0070.00718.35
8.1.120.0110.00418.62
8.1.110.0060.00620.27
8.1.100.0150.00018.43
8.1.90.0040.00918.58
8.1.80.0140.00418.54
8.1.70.0100.00320.15
8.1.60.0110.00718.41
8.1.50.0150.00318.69
8.1.40.0150.00018.80
8.1.30.0080.00818.61
8.1.20.0160.00320.38
8.1.10.0140.00420.39
8.1.00.0090.00918.41

preferences:
34.94 ms | 403 KiB | 5 Q