3v4l.org

run code in 300+ PHP versions simultaneously
<?php const START = 1; const END = 100; /** * バックトレースの深さからインデックス相当の値を取得 * @return int */ function getI() { // debug_backtrace: バックトレースを配列で生成 // @see https://www.php.net/manual/ja/function.debug-backtrace.php // count: 配列の長さを取得 // @see https://www.php.net/manual/ja/function.count.php return count(debug_backtrace()) - 2 + START; } /** * 再帰で Fizz, Buzz を echo */ function echoFizzBuzz() { if (getI() % 15 === 0) { echo getI().': FizzBuzz'; } elseif (getI() % 3 === 0) { echo getI().': Fizz'; } elseif (getI() % 5 === 0) { echo getI().': Buzz'; } else { echo getI().': '.getI(); } echo "\n"; // 再帰で一次変数抜きにループを実現する // 再帰でバックトレースを深くしてインデックスを進める if (getI() < END) { echoFizzBuzz(); } } echoFizzBuzz();

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.140.0070.00318.53
8.3.130.0060.00318.52
8.3.120.0000.01020.96
8.3.110.0110.00020.94
8.3.100.0030.00624.06
8.3.90.0080.00326.77
8.3.80.0110.00016.66
8.3.70.0130.01316.58
8.3.60.0150.01118.08
8.3.50.0140.01224.59
8.3.40.0140.00721.82
8.3.30.0100.00718.72
8.3.20.0000.00924.18
8.3.10.0100.01024.66
8.3.00.0060.00326.16
8.2.250.0030.00616.75
8.2.240.0050.00517.27
8.2.230.0120.00022.58
8.2.220.0090.00937.54
8.2.210.0090.00026.77
8.2.200.0060.00616.50
8.2.190.0170.00316.63
8.2.180.0160.01025.92
8.2.170.0070.01118.83
8.2.160.0070.01422.96
8.2.150.0080.00025.66
8.2.140.0000.00924.66
8.2.130.0000.00926.16
8.2.120.0170.00319.83
8.2.110.0060.00621.04
8.2.100.0030.01017.72
8.2.90.0030.00619.45
8.2.80.0000.01020.53
8.2.70.0060.00317.80
8.2.60.0030.00618.03
8.2.50.0000.00918.10
8.2.40.0050.00519.39
8.2.30.0040.00419.38
8.2.20.0000.00918.18
8.2.10.0100.00019.41
8.2.00.0000.00919.24
8.1.300.0070.01420.14
8.1.290.0070.00318.88
8.1.280.0100.01025.92
8.1.270.0030.00724.05
8.1.260.0000.00926.35
8.1.250.0060.00328.09
8.1.240.0000.01122.16
8.1.230.0080.00421.07
8.1.220.0060.00317.76
8.1.210.0060.00319.17
8.1.200.0030.00717.35
8.1.190.0030.00617.22
8.1.180.0000.01018.10
8.1.170.0050.00518.74
8.1.160.0030.00618.94
8.1.150.0060.00318.77
8.1.140.0030.00618.84
8.1.130.0060.00320.13
8.1.120.0070.00317.48
8.1.110.0000.00917.51
8.1.100.0030.00617.47
8.1.90.0090.00017.43
8.1.80.0060.00317.46
8.1.70.0060.00317.50
8.1.60.0030.00917.55
8.1.50.0070.00317.53
8.1.40.0030.00717.54
8.1.30.0000.01117.55
8.1.20.0040.00717.63
8.1.10.0030.00617.52
8.1.00.0000.01017.47
8.0.300.0090.00020.16
8.0.290.0040.00716.63
8.0.280.0030.00618.51
8.0.270.0060.00316.83
8.0.260.0040.00418.72
8.0.250.0000.00916.90
8.0.240.0000.00917.00
8.0.230.0030.00617.02
8.0.220.0060.00316.88
8.0.210.0000.00816.89
8.0.200.0060.00317.00
8.0.190.0030.00716.96
8.0.180.0030.00716.80
8.0.170.0000.01216.94
8.0.160.0030.00616.80
8.0.150.0000.01016.83
8.0.140.0080.00316.87
8.0.130.0030.00613.29
8.0.120.0070.00316.72
8.0.110.0080.00316.93
8.0.100.0070.00316.93
8.0.90.0030.00616.77
8.0.80.0030.01516.91
8.0.70.0040.00716.77
8.0.60.0000.01016.76
8.0.50.0080.00316.88
8.0.30.0100.01217.10
8.0.20.0170.00817.07
8.0.10.0100.00317.05
8.0.00.0120.01616.71
7.4.330.0040.00415.55
7.4.320.0000.00916.66
7.4.300.0030.00616.51
7.4.290.0060.00316.56
7.4.280.0050.00516.58
7.4.270.0000.00916.50
7.4.260.0040.00413.28
7.4.250.0000.01016.38
7.4.240.0060.00316.57
7.4.230.0000.00916.72
7.4.220.0000.00916.57
7.4.210.0100.01116.57
7.4.200.0100.00016.62
7.4.130.0150.00916.56
7.4.120.0140.01416.54
7.4.110.0070.02316.43
7.4.100.0160.01216.57
7.4.90.0180.01916.47
7.4.80.0160.01316.62
7.4.70.0150.01116.36
7.4.60.0110.01416.39
7.4.50.0130.02216.47
7.4.40.0150.01216.46
7.4.30.0100.01416.61
7.4.20.0230.01416.33
7.4.10.0130.01616.50
7.4.00.0120.01816.38
7.3.330.0090.00016.31
7.3.320.0060.00613.31
7.3.310.0030.00716.21
7.3.300.0030.00616.19
7.3.290.0040.01716.33
7.3.260.0100.02016.68
7.3.250.0130.01316.30
7.3.240.0090.01516.32
7.3.230.0110.02216.46
7.3.220.0070.01716.43
7.3.210.0240.02516.33
7.3.200.0070.02016.57
7.3.190.0130.01816.22
7.3.180.0090.01816.49
7.3.170.0130.02116.30
7.3.160.0100.02516.53
7.3.150.0180.01516.35
7.3.140.0150.01316.57
7.3.130.0100.01716.43
7.3.120.0100.01316.34
7.3.110.0140.01116.41
7.3.100.0140.01216.52
7.3.90.0110.01716.24
7.3.80.0100.01316.57
7.3.70.0200.01316.41
7.3.60.0130.01916.26
7.3.50.0200.00616.52
7.3.40.0130.01016.48
7.3.30.0100.01316.30
7.3.20.0160.01416.34
7.3.10.0200.01316.35
7.3.00.0160.01216.26

preferences:
28.5 ms | 403 KiB | 5 Q