3v4l.org

run code in 300+ PHP versions simultaneously
<?php /*The task is to print out numbers 1 through 100 but for multiples of 3 print out “Fizz” instead of the number and for multiples of 5 print “Buzz” instead. If the number happens to be divisble by both 3 and 5 print out “FizzBuzz” instead of the number.*/ for ($i = 1; $i <= 100; $i++) { $Fizz = ($i % 3 === 0); $Buzz = ($i % 5 === 0); $FizzBuzz = ($Fizz === true && $Buzz === true); foreach (array_splice(get_defined_vars(), 0, 2) as $key => $var) { echo ($var === true) ? $key : $i; } echo $var, PHP_EOL; }

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.0150.00818.43
8.3.50.0160.00321.13
8.3.40.0060.00918.72
8.3.30.0110.00418.84
8.3.20.0040.00420.20
8.3.10.0030.00623.52
8.3.00.0030.00520.20
8.2.180.0130.00318.54
8.2.170.0090.00622.96
8.2.160.0120.00320.52
8.2.150.0090.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0030.00717.63
8.2.110.0030.00722.29
8.2.100.0060.00617.63
8.2.90.0080.00019.25
8.2.80.0000.00817.97
8.2.70.0030.00617.62
8.2.60.0040.00518.05
8.2.50.0000.01218.07
8.2.40.0040.00419.25
8.2.30.0050.00320.68
8.2.20.0030.00617.61
8.2.10.0090.00018.18
8.2.00.0080.00018.18
8.1.280.0110.00725.92
8.1.270.0080.00823.99
8.1.260.0070.00326.35
8.1.250.0040.00428.09
8.1.240.0030.00722.58
8.1.230.0060.00617.42
8.1.220.0040.00417.74
8.1.210.0030.00618.77
8.1.200.0000.01017.38
8.1.190.0000.00817.35
8.1.180.0000.00818.10
8.1.170.0090.00018.46
8.1.160.0080.00022.01
8.1.150.0080.00018.88
8.1.140.0040.00417.38
8.1.130.0060.00317.62
8.1.120.0000.00817.36
8.1.110.0060.00317.42
8.1.100.0030.00617.47
8.1.90.0030.00517.45
8.1.80.0030.00517.35
8.1.70.0030.00317.45
8.1.60.0030.00517.58
8.1.50.0030.00617.47
8.1.40.0040.00417.50
8.1.30.0000.00917.68
8.1.20.0050.00317.66
8.1.10.0050.00317.36
8.1.00.0050.00317.43
8.0.300.0090.00018.77
8.0.290.0050.00316.75
8.0.280.0000.00818.44
8.0.270.0080.00017.25
8.0.260.0030.00317.17
8.0.250.0030.00517.03
8.0.240.0000.00717.02
8.0.230.0040.00416.98
8.0.220.0050.00216.93
8.0.210.0040.00416.82
8.0.200.0040.00417.00
8.0.190.0050.00517.01
8.0.180.0000.01016.93
8.0.170.0040.00716.91
8.0.160.0040.00417.06
8.0.150.0000.00916.91
8.0.140.0000.00916.92
8.0.130.0000.00713.44
8.0.120.0050.00316.93
8.0.110.0040.00416.85
8.0.100.0030.00516.86
8.0.90.0050.00316.95
8.0.80.0060.01316.83
8.0.70.0080.00016.91
8.0.60.0030.00616.85
8.0.50.0030.00516.79
8.0.30.0100.01217.15
8.0.20.0080.01417.40
8.0.10.0040.00416.93
8.0.00.0140.00916.77
7.4.330.0000.00515.21
7.4.320.0030.00316.61
7.4.300.0000.00716.50
7.4.290.0000.00716.64
7.4.280.0040.00416.51
7.4.270.0040.00416.60
7.4.260.0000.00716.39
7.4.250.0050.00316.37
7.4.240.0040.00416.47
7.4.230.0040.00416.60
7.4.220.0130.00616.55
7.4.210.0100.00716.70
7.4.200.0000.00716.66
7.4.160.0060.01216.66
7.4.150.0160.00417.40
7.4.140.0190.01117.86
7.4.130.0130.01516.41
7.4.120.0140.00716.42
7.4.110.0070.01416.68
7.4.100.0180.00316.52
7.4.90.0150.00616.51
7.4.80.0150.00919.39
7.4.70.0150.00416.54
7.4.60.0100.01016.49
7.4.50.0040.00416.27
7.4.40.0140.00716.51
7.4.30.0050.01616.29
7.4.00.0100.00614.78
7.3.330.0000.00613.27
7.3.320.0060.00013.29
7.3.310.0000.00816.38
7.3.300.0040.00416.45
7.3.290.0090.01016.34
7.3.280.0170.00916.36
7.3.270.0160.00317.40
7.3.260.0130.00616.53
7.3.250.0130.00816.38
7.3.240.0120.01216.50
7.3.230.0110.00816.58
7.3.210.0050.01516.47
7.3.200.0080.01116.61
7.3.190.0100.01016.30
7.3.180.0060.01316.22
7.3.170.0110.00716.30
7.3.160.0100.01016.47
7.2.330.0070.01416.65
7.2.320.0100.01016.44
7.2.310.0150.01116.64
7.2.300.0100.01016.37
7.2.290.0150.00516.63
7.2.80.0100.00716.71
7.2.60.0110.00416.99
7.1.200.0150.00015.74
7.1.70.0000.00717.16
7.1.60.0070.00719.29
7.1.50.0040.02116.70
7.1.00.0070.07322.43
7.0.200.0090.00016.64
7.0.60.0070.03720.00
7.0.50.0030.05017.88
7.0.40.0100.06020.09
7.0.30.0100.05020.09
7.0.20.0230.08020.13
7.0.10.0100.05720.12
7.0.00.0000.05320.10
5.6.280.0070.03721.04
5.6.210.0070.06720.70
5.6.200.0030.05018.23
5.6.190.0070.04320.57
5.6.180.0330.05020.61
5.6.170.0100.05320.33
5.6.160.0070.05020.37
5.6.150.0130.07318.17
5.6.140.0130.03018.09
5.6.130.0030.04318.18
5.6.120.0030.04321.00
5.6.110.0100.06320.99
5.6.100.0100.07321.11
5.6.90.0100.08720.93
5.6.80.0070.04020.53
5.5.350.0030.03320.33
5.5.340.0100.06717.92
5.5.330.0030.04320.47
5.5.320.3030.04020.37
5.5.310.0230.08320.28
5.5.300.0030.08317.98
5.5.290.0230.07017.96
5.5.280.0030.06020.89
5.5.270.0070.05720.88
5.5.260.0070.08720.79
5.5.250.0230.07320.77
5.5.240.0070.08020.15
5.4.450.0930.06719.11
5.4.440.0830.05719.41
5.4.430.0830.05719.25
5.4.420.0930.06019.58
5.4.410.0800.05719.45
5.4.400.1100.06019.09
5.4.390.0900.05719.25
5.4.380.0700.06319.25
5.4.370.0730.05319.21
5.4.360.0970.07019.08
5.4.350.0830.05318.75
5.4.340.0830.05319.10
5.4.320.0770.06018.95
5.4.310.0900.04718.89
5.4.300.0670.06019.15
5.4.290.0770.05719.18
5.4.280.0730.06318.75
5.4.270.0800.06018.75
5.4.260.0800.07019.15
5.4.250.0900.06719.15
5.4.240.0800.05719.09
5.4.230.0770.05319.18
5.4.220.0900.04319.04
5.4.210.0770.05719.27
5.4.200.0800.06019.28
5.4.190.0830.06019.24
5.4.180.0830.05318.91
5.4.170.0770.05018.91
5.4.160.0570.05319.03
5.4.150.0100.05719.13
5.4.140.0100.05716.39
5.4.130.0070.06016.20
5.4.120.0530.05016.46
5.4.110.0700.05016.45
5.4.100.0800.05316.45
5.4.90.0800.05716.48
5.4.80.0800.04716.46
5.4.70.0270.04316.39
5.4.60.0070.06316.39
5.4.50.0070.07316.41
5.4.40.0270.06716.36
5.4.30.0330.06316.46
5.4.20.0030.04016.43

preferences:
38.11 ms | 401 KiB | 5 Q