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++) { $var = ($i % 3 === 0) ? "Buzz" : (($i % 5 === 0) ? "Fizz" : $i); if ($i % 3 === 0 && $i % 5 === 0) { $var = "FizzBuzz"; } 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.00418.15
8.3.50.0100.00921.25
8.3.40.0040.01118.54
8.3.30.0070.00718.45
8.3.20.0000.00820.04
8.3.10.0080.00023.61
8.3.00.0050.00320.21
8.2.180.0130.00618.28
8.2.170.0160.00022.96
8.2.160.0040.01120.32
8.2.150.0110.00025.66
8.2.140.0040.00424.66
8.2.130.0060.00326.16
8.2.120.0060.00317.75
8.2.110.0090.00022.04
8.2.100.0040.00817.63
8.2.90.0000.00819.26
8.2.80.0060.00317.97
8.2.70.0000.00917.63
8.2.60.0050.00318.04
8.2.50.0100.00318.07
8.2.40.0050.00219.37
8.2.30.0000.00820.61
8.2.20.0050.00317.68
8.2.10.0060.00318.01
8.2.00.0070.00017.98
8.1.280.0120.00625.92
8.1.270.0130.00723.84
8.1.260.0120.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00622.54
8.1.230.0120.00017.42
8.1.220.0060.00317.79
8.1.210.0080.00018.77
8.1.200.0000.01017.23
8.1.190.0000.00817.25
8.1.180.0040.00418.10
8.1.170.0070.00318.66
8.1.160.0000.00822.04
8.1.150.0080.00018.87
8.1.140.0030.00617.43
8.1.130.0040.00417.69
8.1.120.0040.00417.35
8.1.110.0040.00417.39
8.1.100.0000.00817.34
8.1.90.0070.00017.33
8.1.80.0000.00917.35
8.1.70.0030.00317.44
8.1.60.0000.00717.56
8.1.50.0030.00617.50
8.1.40.0050.00317.46
8.1.30.0000.00817.46
8.1.20.0040.00417.62
8.1.10.0070.00017.51
8.1.00.0030.00617.46
8.0.300.0040.00418.77
8.0.290.0000.00716.75
8.0.280.0040.00418.43
8.0.270.0030.00317.16
8.0.260.0030.00317.21
8.0.250.0040.00416.98
8.0.240.0030.00316.96
8.0.230.0030.00316.90
8.0.220.0030.00316.75
8.0.210.0000.00816.75
8.0.200.0040.00416.80
8.0.190.0000.00716.91
8.0.180.0000.00716.94
8.0.170.0060.00616.81
8.0.160.0000.00717.01
8.0.150.0000.00716.83
8.0.140.0040.00416.79
8.0.130.0070.00013.37
8.0.120.0030.00516.89
8.0.110.0000.00816.90
8.0.100.0040.00416.88
8.0.90.0040.00416.71
8.0.80.0090.00616.88
8.0.70.0050.00216.77
8.0.60.0000.00817.00
8.0.50.0040.00416.87
8.0.30.0100.00917.11
8.0.20.0120.00817.40
8.0.10.0040.00417.04
8.0.00.0130.00716.68
7.4.330.0000.00515.08
7.4.320.0000.00716.51
7.4.300.0030.00316.62
7.4.290.0000.00716.52
7.4.280.0040.00416.50
7.4.270.0020.00516.49
7.4.260.0050.00316.59
7.4.250.0040.00416.52
7.4.240.0060.00216.57
7.4.230.0030.00316.49
7.4.220.0130.01316.38
7.4.210.0090.00616.62
7.4.200.0000.00716.70
7.4.160.0140.00716.23
7.4.150.0080.01217.40
7.4.140.0130.01317.86
7.4.130.0100.01116.51
7.4.120.0110.00816.56
7.4.110.0030.01416.39
7.4.100.0120.00616.34
7.4.90.0140.00616.47
7.4.80.0200.00019.39
7.4.70.0060.01216.68
7.4.60.0100.00716.59
7.4.50.0040.00416.44
7.4.40.0130.01016.43
7.4.30.0090.00916.30
7.4.00.0060.01114.94
7.3.330.0000.00713.18
7.3.320.0030.00313.24
7.3.310.0040.00416.09
7.3.300.0070.00016.14
7.3.290.0070.01116.26
7.3.280.0130.00816.29
7.3.270.0110.00717.40
7.3.260.0090.00916.65
7.3.250.0100.01016.30
7.3.240.0110.01116.21
7.3.230.0100.00716.63
7.3.210.0080.01116.58
7.3.200.0060.01216.42
7.3.190.0110.01116.36
7.3.180.0120.00616.57
7.3.170.0130.00316.51
7.3.160.0110.01116.30
7.3.120.0120.00314.82
7.3.110.0080.01114.88
7.3.100.0060.01214.61
7.3.90.0030.01314.80
7.3.80.0090.00614.78
7.3.70.0070.01114.95
7.3.60.0060.00914.66
7.3.50.0060.00614.78
7.3.40.0100.00714.85
7.3.30.0000.01814.81
7.3.20.0060.00316.63
7.3.10.0100.00416.49
7.3.00.0020.01216.59
7.2.330.0030.01616.62
7.2.320.0060.01216.36
7.2.310.0130.01316.68
7.2.300.0120.00616.72
7.2.290.0150.00916.57
7.2.250.0070.01314.78
7.2.240.0070.01015.08
7.2.230.0040.01115.21
7.2.220.0080.00815.09
7.2.210.0070.00314.93
7.2.200.0000.01814.92
7.2.190.0040.01215.14
7.2.180.0070.00715.08
7.2.170.0030.01314.86
7.2.160.0070.01015.17
7.2.150.0030.00817.06
7.2.140.0130.00317.09
7.2.130.0030.01016.86
7.2.120.0050.00417.02
7.2.110.0080.00616.93
7.2.100.0060.00916.78
7.2.90.0050.01316.93
7.2.80.0060.00616.82
7.2.70.0050.01016.92
7.2.60.0060.00516.88
7.2.50.0030.00816.98
7.2.40.0040.00816.87
7.2.30.0050.00916.77
7.2.20.0070.00616.84
7.2.10.0030.01016.77
7.2.00.0060.00817.87
7.1.330.0060.01215.76
7.1.320.0070.01016.04
7.1.310.0040.00415.94
7.1.300.0050.00515.53
7.1.290.0100.00315.86
7.1.280.0040.01215.81
7.1.270.0060.00915.71
7.1.260.0070.01015.95
7.1.250.0070.00515.83
7.1.240.0090.00615.51
7.1.230.0070.01015.89
7.1.220.0070.00715.79
7.1.210.0000.00915.56
7.1.200.0000.01315.79
7.1.190.0080.00315.80
7.1.180.0000.01615.57
7.1.170.0060.01015.95
7.1.160.0000.01315.95
7.1.150.0120.00015.85
7.1.140.0100.00315.66
7.1.130.0030.00715.99
7.1.120.0090.00315.83
7.1.110.0030.00615.94
7.1.100.0030.00916.95
7.1.90.0030.01015.67
7.1.80.0060.00615.79
7.1.70.0020.00616.49
7.1.60.0120.00717.51
7.1.50.0070.00916.25
7.1.40.0000.01315.84
7.1.30.0030.01515.88
7.1.20.0040.01415.76
7.1.10.0040.00715.52
7.1.00.0000.04719.14
7.0.330.0070.00715.46
7.0.320.0000.00915.31
7.0.310.0000.01215.42
7.0.300.0030.00615.15
7.0.290.0040.01115.36
7.0.280.0050.00515.21
7.0.270.0070.00415.52
7.0.260.0060.00315.39
7.0.250.0030.00615.45
7.0.240.0080.00315.14
7.0.230.0060.00615.24
7.0.220.0070.00415.52
7.0.210.0070.00715.42
7.0.200.0050.00515.78
7.0.190.0060.01215.41
7.0.180.0090.00915.46
7.0.170.0110.00415.32
7.0.160.0000.01315.53
7.0.150.0000.01315.34
7.0.140.0060.00915.29
7.0.130.0070.01015.56
7.0.120.0130.00315.39
7.0.110.0000.01315.32
7.0.100.0000.01115.38
7.0.90.0140.00015.45
7.0.80.0130.00315.55
7.0.70.0080.00415.41
7.0.60.0070.02117.75
7.0.50.0070.03816.80
7.0.40.0050.03916.79
7.0.30.0210.03916.74
7.0.20.0130.03916.74
7.0.10.0100.02416.79
7.0.00.0040.02516.79
5.6.400.0030.01314.65
5.6.390.0100.00714.14
5.6.380.0080.00814.34
5.6.370.0030.00714.54
5.6.360.0090.00314.40
5.6.350.0110.00314.33
5.6.340.0030.00614.66
5.6.330.0000.00914.67
5.6.320.0040.00414.01
5.6.310.0000.01414.22
5.6.300.0090.00614.18
5.6.290.0060.00914.73
5.6.280.0040.02017.55
5.6.270.0070.00714.10
5.6.260.0040.01114.29
5.6.250.0060.01014.45
5.6.240.0030.01014.32
5.6.230.0130.00314.45
5.6.220.0060.00914.36
5.6.210.0090.02217.60
5.6.200.0070.04516.11
5.6.190.0100.02517.43
5.6.180.0160.04617.47
5.6.170.0150.04217.30
5.6.160.0110.04417.35
5.6.150.0060.02816.22
5.6.140.0110.02916.28
5.6.130.0050.04516.10
5.6.120.0090.04017.59
5.6.110.0080.03717.69
5.6.100.0080.04217.77
5.6.90.0020.05117.62
5.6.80.0080.04317.31
5.6.70.0080.00414.27
5.6.60.0130.00314.15
5.6.50.0100.00314.51
5.6.40.0060.00614.15
5.6.30.0030.01014.14
5.6.20.0060.00614.17
5.6.10.0040.00714.37
5.6.00.0060.00614.09
5.5.380.0030.00714.27
5.5.370.0030.00614.36
5.5.360.0070.00714.34
5.5.350.0050.04317.35
5.5.340.0130.03816.22
5.5.330.0090.02817.24
5.5.320.1620.02517.21
5.5.310.0130.02817.27
5.5.300.0050.03316.22
5.5.290.0100.03816.11
5.5.280.0110.02117.64
5.5.270.0050.03917.49
5.5.260.0070.03417.63
5.5.250.0090.03717.41
5.5.240.0070.03817.32
5.5.230.0040.01114.24
5.5.220.0040.00713.94
5.5.210.0030.00914.04
5.5.200.0060.00813.89
5.5.190.0080.00814.29
5.5.180.0030.00713.92
5.5.170.0030.01014.26
5.5.160.0070.00414.26
5.5.150.0060.00614.29
5.5.140.0060.00314.18
5.5.130.0120.00014.08
5.5.120.0030.01014.05
5.5.110.0040.01114.37
5.5.100.0090.00014.22
5.5.90.0100.00713.81
5.5.80.0040.00814.41
5.5.70.0040.01114.50
5.5.60.0080.00414.01
5.5.50.0080.00414.05
5.5.40.0080.00613.82
5.5.30.0030.01214.20
5.5.20.0030.01413.99
5.5.10.0090.00614.20
5.5.00.0120.00314.24
5.4.450.0430.03115.79
5.4.440.0500.03415.77
5.4.430.0600.03715.74
5.4.420.0570.04015.82
5.4.410.0470.03115.54
5.4.400.0530.03315.63
5.4.390.0530.04015.63
5.4.380.0500.02815.43
5.4.370.0370.03315.63
5.4.360.0420.03515.52
5.4.350.0480.03115.59
5.4.340.0520.02315.58
5.4.330.0040.00412.11
5.4.320.0430.03015.68
5.4.310.0400.03415.63
5.4.300.0410.03315.63
5.4.290.0580.03115.52
5.4.280.0420.03315.63
5.4.270.0490.03115.59
5.4.260.0520.03215.63
5.4.250.0430.03415.63
5.4.240.0400.03415.69
5.4.230.0470.02815.64
5.4.220.0430.03015.64
5.4.210.0450.02815.64
5.4.200.0450.03215.44
5.4.190.0440.03215.58
5.4.180.0500.03015.70
5.4.170.0600.03715.57
5.4.160.0500.03115.67
5.4.150.0580.03815.64
5.4.140.0410.04014.27
5.4.130.0430.03014.30
5.4.120.0480.03014.26
5.4.110.0480.02814.32
5.4.100.0430.03014.14
5.4.90.0440.03714.25
5.4.80.0570.03214.30
5.4.70.0220.03414.27
5.4.60.0060.02514.15
5.4.50.0030.01914.15
5.4.40.0150.03814.29
5.4.30.0100.02714.23
5.4.20.0020.02514.15
5.4.10.0070.00412.11
5.4.00.0070.00312.11

preferences:
59.38 ms | 401 KiB | 5 Q