3v4l.org

run code in 300+ PHP versions simultaneously
<?php $iterations = isset($argv[1]) && $argv[1] >= 8 && $argv[1] <= 90 ? $argv[1] : 12; $a = ""; for ($i = 1; $i < $iterations; $i++) { $a. = str_pad("", $iterations-$i-1); for ($j = 0; $j < ($i * 2)-1; $j++) { $a. = $i == 1 ? ("\033[0;33m*\033[0;32m") : (mt_rand(0, 100 / ($i < 6 ? 5 : $i)) == 1 ? ("\033[0;3" . mt_rand(1, 6) . "mo\033[0;32m") : ("^")); $a.="\n"; } $a .= "\033[0;33m" . str_repeat(str_pad("", $iterations-($iterations / 5)) . str_repeat(".", ($iterations/5)) . "\n", ($iterations/8))."\033[0m"; print $a; }

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)
5.4.320.0070.03712.50
5.4.310.0070.03712.50
5.4.300.0040.04012.50
5.4.290.0060.03912.49
5.4.280.0050.04312.39
5.4.270.0080.04112.39
5.4.260.0090.05112.39
5.4.250.0030.04212.39
5.4.240.0080.03412.39
5.4.230.0080.04012.38
5.4.220.0050.04012.38
5.4.210.0070.03512.38
5.4.200.0090.05012.38
5.4.190.0080.04412.38
5.4.180.0050.03812.38
5.4.170.0060.03812.39
5.4.160.0090.03612.38
5.4.150.0050.04112.38
5.4.140.0070.04012.07
5.4.130.0040.03812.05
5.4.120.0060.03612.02
5.4.110.0050.03712.01
5.4.100.0070.03412.01
5.4.90.0100.03312.01
5.4.80.0070.03612.01
5.4.70.0080.03612.01
5.4.60.0050.04312.01
5.4.50.0050.04212.01
5.4.40.0050.03912.00
5.4.30.0070.03712.00
5.4.20.0040.03811.99
5.4.10.0090.03211.99
5.4.00.0040.03911.48
5.3.290.0080.04112.80
5.3.280.0080.05012.70
5.3.270.0100.05012.72
5.3.260.0160.05112.72
5.3.250.0140.05012.72
5.3.240.0140.05412.72
5.3.230.0090.05612.71
5.3.220.0090.05012.68
5.3.210.0060.04512.68
5.3.200.0040.03812.68
5.3.190.0080.03612.68
5.3.180.0070.03612.67
5.3.170.0080.04012.67
5.3.160.0090.04212.67
5.3.150.0040.03912.67
5.3.140.0050.04012.66
5.3.130.0080.03912.66
5.3.120.0110.03512.66
5.3.110.0040.04612.66
5.3.100.0030.04612.12
5.3.90.0050.03712.08
5.3.80.0050.03812.07
5.3.70.0070.03612.08
5.3.60.0080.03712.06
5.3.50.0130.03512.00
5.3.40.0100.04012.00
5.3.30.0060.03911.95
5.3.20.0050.04111.73
5.3.10.0060.03611.70
5.3.00.0090.03911.68
5.2.170.0060.0319.19
5.2.160.0060.0319.19
5.2.150.0080.0439.19
5.2.140.0050.0429.18
5.2.130.0070.0289.14
5.2.120.0040.0309.14
5.2.110.0040.0309.15
5.2.100.0110.0239.15
5.2.90.0050.0319.15
5.2.80.0040.0329.14
5.2.70.0050.0319.14
5.2.60.0060.0299.09
5.2.50.0020.0339.06
5.2.40.0040.0309.04
5.2.30.0060.0299.02
5.2.20.0060.0279.00
5.2.10.0040.0298.93
5.2.00.0050.0298.79
5.1.60.0070.0338.07
5.1.50.0040.0318.06
5.1.40.0050.0278.05
5.1.30.0050.0398.40
5.1.20.0090.0348.42
5.1.10.0040.0368.15
5.1.00.0060.0288.14
5.0.50.0080.0256.62
5.0.40.0020.0216.48
5.0.30.0030.0366.29
5.0.20.0040.0266.27
5.0.10.0030.0286.25
5.0.00.0070.0396.24
4.4.90.0030.0224.78
4.4.80.0050.0194.75
4.4.70.0050.0194.76
4.4.60.0000.0184.75
4.4.50.0010.0184.77
4.4.40.0050.0284.70
4.4.30.0050.0194.76
4.4.20.0020.0234.84
4.4.10.0040.0164.85
4.4.00.0040.0254.76
4.3.110.0050.0194.67
4.3.100.0030.0164.66
4.3.90.0050.0204.63
4.3.80.0040.0284.58
4.3.70.0030.0154.63
4.3.60.0010.0174.63
4.3.50.0050.0134.63
4.3.40.0030.0264.54
4.3.30.0020.0173.29
4.3.20.0030.0203.27
4.3.10.0020.0183.23
4.3.00.0130.0237.76

preferences:
141.08 ms | 1398 KiB | 7 Q