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) { var_dump($var); } die; 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.0100.01018.55
8.3.50.0030.01016.38
8.3.40.0120.00318.71
8.3.30.0040.01118.68
8.3.20.0050.00320.19
8.3.10.0090.00023.65
8.3.00.0040.00420.29
8.2.180.0070.00718.13
8.2.170.0150.00022.96
8.2.160.0070.00720.22
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0000.00726.16
8.2.120.0040.00417.75
8.2.110.0060.00322.25
8.2.100.0040.00817.63
8.2.90.0060.00319.21
8.2.80.0030.00517.97
8.2.70.0000.00817.62
8.2.60.0030.00618.16
8.2.50.0090.00018.07
8.2.40.0000.00719.31
8.2.30.0040.00420.62
8.2.20.0050.00217.74
8.2.10.0040.00418.19
8.2.00.0000.01018.04
8.1.280.0070.00725.92
8.1.270.0160.00324.01
8.1.260.0050.00526.35
8.1.250.0070.00028.09
8.1.240.0060.00322.52
8.1.230.0090.00317.42
8.1.220.0040.00417.76
8.1.210.0040.00418.77
8.1.200.0060.00317.13
8.1.190.0080.00017.13
8.1.180.0030.00618.10
8.1.170.0060.00318.53
8.1.160.0000.00722.02
8.1.150.0000.00718.89
8.1.140.0040.00417.36
8.1.130.0040.00417.57
8.1.120.0000.00717.36
8.1.110.0050.00217.46
8.1.100.0000.00717.50
8.1.90.0040.00417.45
8.1.80.0040.00417.43
8.1.70.0000.00717.36
8.1.60.0000.00717.59
8.1.50.0000.00717.52
8.1.40.0000.00817.56
8.1.30.0030.00517.59
8.1.20.0040.00417.61
8.1.10.0050.00317.57
8.1.00.0040.00417.34
8.0.300.0000.00818.77
8.0.290.0070.00016.75
8.0.280.0000.00718.50
8.0.270.0070.00017.17
8.0.260.0030.00317.30
8.0.250.0000.00717.05
8.0.240.0000.00716.99
8.0.230.0040.00416.98
8.0.220.0070.00016.98
8.0.210.0000.00816.96
8.0.200.0030.00317.02
8.0.190.0050.00317.08
8.0.180.0040.00416.98
8.0.170.0070.00317.04
8.0.160.0070.00016.94
8.0.150.0040.00416.80
8.0.140.0040.00416.96
8.0.130.0000.00513.34
8.0.120.0040.00416.89
8.0.110.0020.00516.89
8.0.100.0000.00716.89
8.0.90.0080.00016.79
8.0.80.0070.01017.00
8.0.70.0040.00417.02
8.0.60.0030.00516.89
8.0.50.0040.00416.84
8.0.30.0100.00817.15
8.0.20.0100.01117.40
8.0.10.0080.00017.19
8.0.00.0130.00716.87
7.4.330.0050.00015.15
7.4.320.0000.00616.61
7.4.300.0030.00316.59
7.4.290.0030.00316.60
7.4.280.0030.00616.63
7.4.270.0070.00016.49
7.4.260.0000.00716.57
7.4.250.0000.00816.57
7.4.240.0030.00416.51
7.4.230.0000.00816.64
7.4.220.0100.01016.52
7.4.210.0040.01216.61
7.4.200.0030.00316.50
7.4.160.0080.00816.56
7.4.150.0110.00717.40
7.4.140.0140.01017.86
7.4.130.0130.00816.51
7.4.120.0100.00716.55
7.4.110.0090.00916.41
7.4.100.0030.01416.68
7.4.90.0120.01216.43
7.4.80.0130.01219.39
7.4.70.0060.00916.61
7.4.60.0030.01216.42
7.4.50.0000.00816.71
7.4.40.0070.01016.72
7.4.30.0060.01716.35
7.4.00.0060.01214.98
7.3.330.0060.00013.19
7.3.320.0000.00513.19
7.3.310.0030.00316.46
7.3.300.0040.00416.37
7.3.290.0110.00716.38
7.3.280.0080.00816.42
7.3.270.0140.00317.40
7.3.260.0100.00716.71
7.3.250.0080.01016.42
7.3.240.0100.01016.59
7.3.230.0070.01416.41
7.3.210.0080.00916.36
7.3.200.0060.01216.34
7.3.190.0100.00616.34
7.3.180.0080.00816.68
7.3.170.0060.01116.45
7.3.160.0180.00016.43
7.3.120.0090.00914.95
7.3.110.0060.00614.99
7.3.100.0070.00714.55
7.3.90.0070.00714.73
7.3.80.0090.00014.52
7.3.70.0080.00814.63
7.3.60.0060.00314.71
7.3.50.0030.01014.54
7.3.40.0060.00914.81
7.3.30.0040.01114.92
7.3.20.0120.00616.71
7.3.10.0090.00616.55
7.3.00.0100.00016.45
7.2.330.0030.01516.59
7.2.320.0000.01916.70
7.2.310.0060.01216.70
7.2.300.0100.00616.76
7.2.290.0070.01216.75
7.2.240.0050.00514.72
7.2.230.0040.01114.90
7.2.220.0070.00415.07
7.2.210.0000.01614.78
7.2.200.0030.00715.08
7.2.190.0110.00415.02
7.2.180.0060.01015.00
7.2.170.0000.01414.62
7.2.160.0040.01215.02
7.2.150.0120.00016.91
7.2.140.0030.01316.77
7.2.130.0120.00416.92
7.2.120.0080.00816.89
7.2.110.0070.01116.56
7.2.100.0070.01016.85
7.2.90.0070.00716.80
7.2.80.0000.01316.72
7.2.70.0040.01116.40
7.2.60.0060.00616.92
7.2.50.0080.00616.88
7.2.40.0030.01016.66
7.2.30.0070.00716.98
7.2.20.0030.01016.94
7.2.10.0070.00416.89
7.2.00.0060.00718.14
7.1.330.0070.00715.97
7.1.320.0000.01515.81
7.1.310.0030.00715.83
7.1.300.0030.01015.73
7.1.290.0060.01015.62
7.1.280.0030.01015.69
7.1.270.0070.00715.88
7.1.260.0100.00715.92
7.1.250.0040.00715.41
7.1.200.0030.01015.94
7.1.100.0080.00817.90
7.1.70.0030.00317.19
7.1.60.0060.01219.29
7.1.50.0090.00917.05
7.1.00.0000.08022.28
7.0.200.0030.00716.76
7.0.60.0130.08719.88
7.0.50.0030.04017.89
7.0.40.0100.05020.07
7.0.30.0370.07720.09
7.0.20.0300.07020.09
7.0.10.0030.05020.16
7.0.00.0070.08320.09
5.6.280.0070.09020.89
5.6.210.0100.04020.72
5.6.200.0000.05318.19
5.6.190.0000.04720.40
5.6.180.0300.04320.75
5.6.170.0330.07020.33
5.6.160.0070.08320.41
5.6.150.0130.07318.18
5.6.140.0170.06018.21
5.6.130.0100.06318.07
5.6.120.0070.08720.97
5.6.110.0130.06021.02
5.6.100.0030.08320.99
5.6.90.0070.08720.99
5.6.80.0200.07020.54
5.5.350.0000.08720.39
5.5.340.0030.08718.04
5.5.330.0030.08720.56
5.5.320.3370.04020.21
5.5.310.0230.04020.20
5.5.300.0070.08017.95
5.5.290.0130.06017.96
5.5.280.0070.04020.68
5.5.270.0030.09020.84
5.5.260.0130.08020.86
5.5.250.0070.06720.65
5.5.240.0000.07320.13
5.4.450.0230.06019.22
5.4.440.0370.04719.48
5.4.430.0300.05319.65
5.4.420.0270.05719.60
5.4.410.0370.07019.08
5.4.400.0200.06319.22
5.4.390.0400.05319.25
5.4.380.0270.05719.25
5.4.370.0330.04719.26
5.4.360.0270.06019.31
5.4.350.0400.06718.78
5.4.340.0430.05719.10
5.4.320.0270.07319.05
5.4.310.0170.07019.16
5.4.300.0300.05319.15
5.4.290.0200.06019.14
5.4.280.0300.05319.28
5.4.270.0300.05319.08
5.4.260.0300.05719.15
5.4.250.0430.05318.77
5.4.240.0270.05718.88
5.4.230.0300.04719.18
5.4.220.0300.06718.92
5.4.210.0570.04319.04
5.4.200.0270.07319.27
5.4.190.0430.06718.98
5.4.180.0300.06719.30
5.4.170.0370.06319.30
5.4.160.0330.05018.95
5.4.150.0300.06019.18
5.4.140.0430.05716.29
5.4.130.0270.06016.35
5.4.120.0230.05316.25
5.4.110.0200.06316.09
5.4.100.0300.06016.49
5.4.90.0300.05016.18
5.4.80.0300.05716.43
5.4.70.0270.05316.43
5.4.60.0070.07316.47
5.4.50.0070.03316.18
5.4.40.0100.04016.46
5.4.30.0300.06716.36
5.4.20.0070.05716.27

preferences:
57.39 ms | 400 KiB | 5 Q