3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $argv[1]=$i='4N4P9N7P1N1P2N2P'; preg_match_all('/(\d+)(\w)/',$argv[1],$m,2); //$o='';foreach($m as $p)$o.=str_repeat($p[2]=='N'?'=':'-',$p[1]); $o='';foreach($m as $p)$o.=str_pad('',$p[1],$p[2]=='N'?'=':'-'); $a=preg_replace('/./','_',$o=str_replace('--','- ',$o)); echo("$a\n\n\n$o\n\n$a\n");
based on Bsj6I

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).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
7.3.10.0040.01216.78
7.3.00.0040.00816.58
7.2.130.0030.01017.06
7.2.120.0000.01516.68
7.2.110.0000.01417.01
7.2.100.0130.01016.81
7.2.90.0080.00817.08
7.2.80.0080.01017.32
7.2.70.0060.00916.75
7.2.60.0120.00616.98
7.2.50.0160.00817.25
7.2.40.0150.00617.13
7.2.30.0030.00916.82
7.2.20.0110.01117.00
7.2.10.0060.00917.06
7.2.00.0090.00818.35
7.1.250.0070.01015.85
7.1.100.0030.01018.35
7.1.70.0000.00817.10
7.1.60.0140.01019.50
7.1.50.0000.01517.21
7.1.00.0100.07022.29
7.0.200.0680.00315.06
7.0.140.0070.07022.04
7.0.110.0100.08319.95
7.0.100.0000.08019.99
7.0.90.0000.08719.99
7.0.80.0100.07720.07
7.0.70.0100.07319.93
7.0.60.0070.08319.69
7.0.50.0070.07720.38
7.0.40.0070.08320.19
7.0.30.0170.07320.18
7.0.20.0100.05020.15
7.0.10.0000.08020.04
7.0.00.0030.08720.06
5.6.280.0100.06320.86
5.6.250.0000.08320.67
5.6.240.0130.08020.47
5.6.230.0100.06020.57
5.6.220.0070.07720.63
5.6.210.0100.07720.63
5.6.200.0070.08020.99
5.6.190.0070.08720.96
5.6.180.0130.07321.14
5.6.170.0070.08021.09
5.6.160.0130.08021.27
5.6.150.0100.07321.18
5.6.140.0070.08720.91
5.6.130.0070.08721.08
5.6.120.0030.09021.14
5.6.110.0070.08721.07
5.6.100.0030.05321.25
5.6.90.0130.07321.05
5.6.80.0130.04720.52
5.6.70.0200.06320.51
5.6.60.0070.07720.58
5.6.50.0170.06720.42
5.6.40.0100.07720.64
5.6.30.0100.07720.45
5.6.20.0070.08020.64
5.6.10.0000.08720.30
5.6.00.0100.05320.28
5.5.380.0230.06320.59
5.5.370.0100.07720.54
5.5.360.0070.08020.36
5.5.350.0130.08020.43
5.5.340.0070.08020.70
5.5.330.0200.07020.87
5.5.320.0070.08320.75
5.5.310.0100.07020.76
5.5.300.0070.05021.04
5.5.290.0100.08720.96
5.5.280.0100.07720.76
5.5.270.0000.09020.88
5.5.260.0170.07020.88
5.5.250.0070.08020.71
5.5.240.0100.07020.34
5.5.230.0100.07720.15
5.5.220.0100.07320.32
5.5.210.0100.05320.27
5.5.200.0070.08320.16
5.5.190.0170.04020.39
5.5.180.0200.07020.13
5.5.160.0030.07720.05
5.5.150.0130.07020.16
5.5.140.0100.07720.32
5.5.130.0100.07020.15
5.5.120.0070.04320.39
5.5.110.0100.07720.30
5.5.100.0030.08020.15
5.5.90.0130.07020.25
5.5.80.0130.07720.05
5.5.70.0030.04720.27
5.5.60.0070.07720.07
5.5.50.0130.06320.03
5.5.40.0100.07320.23
5.5.30.0130.06720.20
5.5.20.0100.05320.22
5.5.10.0000.07320.22
5.5.00.0070.08020.01
5.4.450.0070.08019.28
5.4.440.0030.05319.43
5.4.430.0070.07719.30
5.4.420.0070.07319.33
5.4.410.0070.08019.31
5.4.400.0130.07319.13
5.4.390.0130.07318.95
5.4.380.0070.07019.25
5.4.370.0100.07019.18
5.4.360.0100.06719.12
5.4.350.0070.04719.12
5.4.340.0070.07019.00
5.4.320.0030.08718.98
5.4.310.0170.07019.03
5.4.300.0070.07319.15
5.4.290.0030.07318.95
5.4.280.0130.06719.10
5.4.270.0200.03019.03
5.4.260.0100.07719.24
5.4.250.0070.07019.24
5.4.240.0130.07019.03
5.4.230.0070.07318.98
5.4.220.0100.04319.00
5.4.210.0030.07719.09
5.4.200.0000.05019.24
5.4.190.0100.07719.10
5.4.180.0100.07719.16
5.4.170.0030.08019.19
5.4.160.0070.06718.98
5.4.150.0100.06719.25
5.4.140.0100.04716.20
5.4.130.0030.04316.19
5.4.120.0070.07016.33
5.4.110.0030.07316.38
5.4.100.0030.04016.40
5.4.90.0070.07016.13
5.4.80.0130.06716.47
5.4.70.0070.07016.50
5.4.60.0000.07716.48
5.4.50.0130.04316.36
5.4.40.0100.04316.52
5.4.30.0130.06016.38
5.4.20.0070.06716.38
5.4.10.0200.05316.49
5.4.00.0070.07015.91
5.3.290.0070.06714.54
5.3.280.0070.07314.68
5.3.270.0030.07314.61
5.3.260.0070.07314.54
5.3.250.0000.07714.54
5.3.240.0070.07314.39
5.3.230.0070.07314.43
5.3.220.0100.07014.39
5.3.210.0030.08314.42
5.3.200.0030.04714.50
5.3.190.0070.06714.36
5.3.180.0070.07714.63
5.3.170.0100.07714.47
5.3.160.0070.04014.46
5.3.150.0100.07014.63
5.3.140.0070.07014.43
5.3.130.0030.07314.50
5.3.120.0070.07314.64
5.3.110.0100.07014.64
5.3.100.0000.07314.05
5.3.90.0100.06714.02
5.3.80.0100.07013.96
5.3.70.0070.04313.84
5.3.60.0130.06713.87
5.3.50.0070.07313.85
5.3.40.0070.07013.91
5.3.30.0100.05713.82
5.3.20.0130.06713.70
5.3.10.0100.07013.48
5.3.00.0000.05713.67
5.2.170.0070.03311.05
5.2.160.0100.05311.21
5.2.150.0030.06011.16
5.2.140.0000.04311.16
5.2.130.0100.05311.03
5.2.120.0130.05011.11
5.2.110.0000.06311.27
5.2.100.0030.05711.12
5.2.90.0070.06011.01
5.2.80.0070.06011.17
5.2.70.0130.05311.03
5.2.60.0030.05011.08
5.2.50.0070.06011.02
5.2.40.0070.06011.07
5.2.30.0100.05311.05
5.2.20.0070.03310.96
5.2.10.0000.06310.71
5.2.00.0100.05310.72
5.1.60.0030.05310.00
5.1.50.0130.04310.14
5.1.40.0000.0539.96
5.1.30.0070.04310.26
5.1.20.0030.06010.24
5.1.10.0030.06010.23
5.1.00.0100.05010.00
5.0.50.0070.0438.63
5.0.40.0070.0408.34
5.0.30.0070.0578.16
5.0.20.0030.0208.16
5.0.10.0030.0438.18
5.0.00.0000.0508.42
4.4.90.0030.0378.00
4.4.80.0000.0378.00
4.4.70.0100.0208.00
4.4.60.0070.0308.00
4.4.50.0030.0378.00
4.4.40.0030.0508.00
4.4.30.0170.0208.00
4.4.20.0000.0378.00
4.4.10.0000.0378.00
4.4.00.0070.0508.00
4.3.110.0000.0408.00
4.3.100.0030.0338.00
4.3.90.0030.0378.00
4.3.80.0030.0508.00
4.3.70.0000.0378.00
4.3.60.0030.0338.00
4.3.50.0030.0338.00
4.3.40.0030.0538.00
4.3.30.0000.0378.00
4.3.20.0030.0308.00
4.3.10.0000.0408.00
4.3.00.0000.0308.00