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, 1) as $key => $var) { echo ($var === true) ? $key : $i, 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.70.0100.00718.41
8.3.60.0160.00318.68
8.3.50.0110.01021.20
8.3.40.0120.00318.38
8.3.30.0130.00318.54
8.3.20.0040.00420.18
8.3.10.0040.00423.66
8.3.00.0060.00321.95
8.2.180.0080.00818.16
8.2.170.0120.00622.96
8.2.160.0040.01120.39
8.2.150.0080.00024.18
8.2.140.0030.00624.66
8.2.130.0080.00026.16
8.2.120.0000.00917.75
8.2.110.0070.00422.25
8.2.100.0120.00017.75
8.2.90.0030.00519.19
8.2.80.0040.00417.97
8.2.70.0040.00417.63
8.2.60.0040.00417.93
8.2.50.0100.00518.07
8.2.40.0040.00419.46
8.2.30.0040.00420.62
8.2.20.0040.00417.73
8.2.10.0050.00318.11
8.2.00.0000.00818.03
8.1.280.0100.00725.92
8.1.270.0040.00424.66
8.1.260.0090.00026.35
8.1.250.0030.00628.09
8.1.240.0070.00422.53
8.1.230.0030.00917.42
8.1.220.0050.00317.74
8.1.210.0080.00018.77
8.1.200.0090.00017.35
8.1.190.0040.00417.11
8.1.180.0000.00818.10
8.1.170.0040.00718.69
8.1.160.0000.00722.05
8.1.150.0000.00718.88
8.1.140.0030.00617.50
8.1.130.0080.00017.63
8.1.120.0080.00017.35
8.1.110.0060.00317.32
8.1.100.0080.00017.36
8.1.90.0040.00417.33
8.1.80.0100.00017.34
8.1.70.0000.00817.43
8.1.60.0000.00917.45
8.1.50.0000.00817.54
8.1.40.0030.00517.52
8.1.30.0050.00317.69
8.1.20.0050.00317.68
8.1.10.0030.00617.43
8.1.00.0000.00817.43
8.0.300.0040.00418.77
8.0.290.0060.00316.75
8.0.280.0030.00518.44
8.0.270.0030.00317.10
8.0.260.0000.00617.23
8.0.250.0000.00816.95
8.0.240.0030.00317.00
8.0.230.0040.00416.93
8.0.220.0000.00716.96
8.0.210.0030.00616.93
8.0.200.0040.00416.88
8.0.190.0000.00816.87
8.0.180.0040.00716.95
8.0.170.0030.00717.00
8.0.160.0080.00016.92
8.0.150.0000.00816.86
8.0.140.0050.00316.73
8.0.130.0000.00613.37
8.0.120.0000.00816.78
8.0.110.0080.00016.86
8.0.100.0080.00016.97
8.0.90.0040.00416.92
8.0.80.0000.01516.97
8.0.70.0040.00416.81
8.0.60.0030.00616.90
8.0.50.0000.00716.77
8.0.30.0110.00817.01
8.0.20.0140.00717.40
8.0.10.0030.00517.00
8.0.00.0120.00816.66
7.4.330.0030.00315.09
7.4.320.0030.00316.56
7.4.300.0030.00316.40
7.4.290.0030.00316.60
7.4.280.0000.00816.37
7.4.270.0040.00416.46
7.4.260.0070.00016.39
7.4.250.0000.00716.55
7.4.240.0030.00516.45
7.4.230.0000.00716.29
7.4.220.0160.01316.60
7.4.210.0090.01216.54
7.4.200.0000.00716.30
7.4.160.0100.00716.55
7.4.150.0120.00917.40
7.4.140.0130.01317.86
7.4.130.0090.01216.42
7.4.120.0090.01016.45
7.4.110.0110.00716.63
7.4.100.0140.00616.59
7.4.90.0130.00616.42
7.4.80.0180.00619.39
7.4.70.0100.00716.51
7.4.60.0190.00316.50
7.4.50.0000.00616.45
7.4.40.0090.00916.43
7.4.30.0120.00616.48
7.4.00.0050.01414.68
7.3.330.0060.00013.29
7.3.320.0000.00613.32
7.3.310.0050.00316.52
7.3.300.0080.00016.40
7.3.290.0120.00516.41
7.3.280.0100.01316.37
7.3.270.0070.01217.40
7.3.260.0030.02716.31
7.3.250.0150.00416.38
7.3.240.0150.00916.58
7.3.230.0070.01316.39
7.3.210.0070.01016.29
7.3.200.0070.01016.36
7.3.190.0110.00716.43
7.3.180.0060.01516.40
7.3.170.0170.00416.37
7.3.160.0090.01216.46
7.3.120.0070.01314.79
7.3.110.0060.00914.68
7.3.100.0000.01414.71
7.3.90.0110.00314.97
7.3.80.0060.00614.96
7.3.70.0070.00714.88
7.3.60.0090.00014.85
7.3.50.0060.00614.96
7.3.40.0000.00914.82
7.3.30.0090.00614.78
7.3.20.0070.00316.70
7.3.10.0060.00316.61
7.3.00.0040.01116.65
7.2.330.0080.01116.39
7.2.320.0070.01116.40
7.2.310.0190.00716.75
7.2.300.0090.00916.74
7.2.290.0070.01416.52
7.2.250.0120.00915.01
7.2.240.0070.01415.20
7.2.230.0030.00615.18
7.2.220.0090.00315.09
7.2.210.0080.00615.03
7.2.200.0030.01315.20
7.2.190.0040.01114.75
7.2.180.0030.01315.19
7.2.170.0000.01014.96
7.2.60.0090.00616.99
7.2.00.0090.00619.21
7.1.330.0100.00715.69
7.1.320.0070.01115.85
7.1.310.0040.01115.77
7.1.300.0070.00315.60
7.1.290.0030.00615.91
7.1.280.0070.01015.91
7.1.270.0070.00715.96
7.1.260.0100.00315.52
7.1.200.0070.00715.93
7.1.100.0000.01118.38
7.1.70.0040.00417.23
7.1.60.0040.01119.29
7.1.50.0070.01816.99
7.1.00.0070.07022.32
7.0.200.0050.00316.73
7.0.60.0100.08320.00
7.0.50.0070.04717.78
7.0.40.0070.04719.96
7.0.30.0270.04320.01
7.0.20.0170.04020.09
7.0.10.0070.06720.04
7.0.00.0100.04020.01
5.6.280.0030.06720.89
5.6.210.0070.07720.76
5.6.200.0100.09318.15
5.6.190.0000.04720.77
5.6.180.0270.05320.41
5.6.170.0330.06020.49
5.6.160.0170.04020.49
5.6.150.0070.07318.21
5.6.140.0070.04018.18
5.6.130.0170.06018.17
5.6.120.0130.07720.98
5.6.110.0030.06020.98
5.6.100.0030.04321.05
5.6.90.0130.07721.07
5.6.80.0070.05320.40
5.5.350.0070.08020.28
5.5.340.0030.08717.91
5.5.330.0170.08320.06
5.5.320.3400.04320.34
5.5.310.0270.08320.21
5.5.300.0030.07717.91
5.5.290.0030.04017.87
5.5.280.0070.03720.88
5.5.270.0030.05020.75
5.5.260.0030.04020.64
5.5.250.0030.08720.49
5.5.240.0030.08020.15
5.4.450.0870.04319.53
5.4.440.0730.06019.21
5.4.430.0630.06319.27
5.4.420.0570.06719.42
5.4.410.0670.06318.98
5.4.400.0600.06019.30
5.4.390.0770.06719.22
5.4.380.0830.05019.25
5.4.370.0700.05019.15
5.4.360.0630.05719.00
5.4.350.0630.05319.31
5.4.340.0670.05319.28
5.4.320.0630.05718.93
5.4.310.0630.05719.28
5.4.300.0670.06018.93
5.4.290.0770.07719.08
5.4.280.0870.06719.14
5.4.270.0700.05318.75
5.4.260.0870.07019.10
5.4.250.0830.06319.04
5.4.240.0670.06018.92
5.4.230.0670.07719.21
5.4.220.0600.06319.11
5.4.210.0730.04718.77
5.4.200.0770.05319.08
5.4.190.0730.06019.07
5.4.180.0700.05019.21
5.4.170.0630.06019.17
5.4.160.0770.05319.03
5.4.150.0670.06718.86
5.4.140.0830.06316.19
5.4.130.0770.04016.29
5.4.120.0670.05316.59
5.4.110.0670.05716.49
5.4.100.0700.05016.50
5.4.90.0630.06316.51
5.4.80.0830.06316.45
5.4.70.0230.03316.02
5.4.60.0070.07016.28
5.4.50.0070.06316.20
5.4.40.0270.06716.46
5.4.30.0230.06316.36
5.4.20.0030.05316.39

preferences:
69.07 ms | 401 KiB | 5 Q