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.04112.50
5.4.310.0070.05812.49
5.4.300.0070.03812.50
5.4.290.0160.05212.50
5.4.280.0090.03712.39
5.4.270.0080.04212.39
5.4.260.0110.06312.39
5.4.250.0050.05012.39
5.4.240.0110.05812.39
5.4.230.0090.05612.38
5.4.220.0080.05012.39
5.4.210.0070.05012.39
5.4.200.0100.05612.38
5.4.190.0120.06912.38
5.4.180.0070.05012.38
5.4.170.0120.06612.39
5.4.160.0170.04912.39
5.4.150.0100.06712.38
5.4.140.0090.05512.07
5.4.130.0090.04612.05
5.4.120.0110.04612.02
5.4.110.0080.04512.02
5.4.100.0120.04312.01
5.4.90.0070.04112.01
5.4.80.0090.03812.01
5.4.70.0060.03512.00
5.4.60.0060.04112.01
5.4.50.0090.04912.00
5.4.40.0090.04012.00
5.4.30.0090.04311.99
5.4.20.0110.03711.99
5.4.10.0070.03811.99
5.4.00.0060.04011.48
5.3.290.0070.04412.80
5.3.280.0060.05012.71
5.3.270.0110.04112.72
5.3.260.0070.04812.71
5.3.250.0080.03912.72
5.3.240.0060.03812.72
5.3.230.0060.03812.71
5.3.220.0090.03612.68
5.3.210.0060.04112.68
5.3.200.0120.04712.68
5.3.190.0060.04712.68
5.3.180.0080.05212.68
5.3.170.0110.05112.67
5.3.160.0100.05112.67
5.3.150.0090.05412.67
5.3.140.0100.04912.66
5.3.130.0080.05412.66
5.3.120.0120.04512.65
5.3.110.0060.04112.66
5.3.100.0060.04112.12
5.3.90.0080.03712.08
5.3.80.0070.03912.08
5.3.70.0100.03412.07
5.3.60.0060.04112.07
5.3.50.0130.04212.00
5.3.40.0120.04412.00
5.3.30.0070.04311.95
5.3.20.0070.04611.73
5.3.10.0220.09411.70
5.3.00.0110.05511.68
5.2.170.0070.0459.18
5.2.160.0130.0619.19
5.2.150.0090.0609.19
5.2.140.0200.0799.18
5.2.130.0130.0679.14
5.2.120.0120.0529.15
5.2.110.0160.0789.15
5.2.100.0150.0469.15
5.2.90.0070.0399.14
5.2.80.0050.0399.14
5.2.70.0070.0379.14
5.2.60.0050.0319.09
5.2.50.0050.0319.07
5.2.40.0040.0319.04
5.2.30.0040.0309.02
5.2.20.0060.0319.00
5.2.10.0080.0338.93
5.2.00.0050.0658.79
5.1.60.0040.0368.07
5.1.50.0050.0278.07
5.1.40.0050.0378.05
5.1.30.0080.0398.40
5.1.20.0110.0348.42
5.1.10.0070.0348.14
5.1.00.0080.0348.14
5.0.50.0020.0286.63
5.0.40.0030.0376.49
5.0.30.0060.0426.30
5.0.20.0040.0276.27
5.0.10.0060.0266.25
5.0.00.0040.0466.24
4.4.90.0050.0214.78
4.4.80.0090.0274.75
4.4.70.0030.0264.75
4.4.60.0040.0374.75
4.4.50.0040.0164.77
4.4.40.0030.0294.71
4.4.30.0040.0164.75
4.4.20.0030.0214.84
4.4.10.0030.0194.85
4.4.00.0070.0344.76
4.3.110.0070.0214.67
4.3.100.0060.0164.66
4.3.90.0030.0154.63
4.3.80.0030.0264.58
4.3.70.0050.0174.63
4.3.60.0040.0164.63
4.3.50.0030.0174.63
4.3.40.0030.0254.54
4.3.30.0040.0153.29
4.3.20.0020.0173.27
4.3.10.0030.0153.23
4.3.00.0030.01715.66

preferences:
154.72 ms | 1386 KiB | 7 Q