3v4l.org

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

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.0130.00416.68
7.3.00.0180.00316.67
7.2.130.0150.00916.84
7.2.120.0100.00717.15
7.2.110.0160.00416.95
7.2.100.0060.00617.29
7.2.90.0000.01317.13
7.2.80.0090.00617.24
7.2.70.0060.01216.86
7.2.60.0070.01016.82
7.2.50.0130.00717.13
7.2.40.0030.01016.79
7.2.30.0040.00917.00
7.2.20.0000.01017.12
7.2.10.0080.00417.22
7.2.00.0040.00718.29
7.1.250.0150.00816.05
7.1.100.0060.00618.32
7.1.70.0100.00717.33
7.1.60.0070.02019.50
7.1.50.0000.01117.05
7.1.00.0000.08022.53
7.0.200.0720.00315.13
7.0.140.0070.06021.97
7.0.60.0100.08320.08
7.0.50.0000.08717.92
7.0.40.0130.07720.32
7.0.30.0270.07720.06
7.0.20.0070.05320.20
7.0.10.0270.08320.35
7.0.00.0030.07020.13
5.6.280.0070.06721.11
5.6.210.0100.08020.74
5.6.200.0130.06018.17
5.6.190.0030.07020.28
5.6.180.0300.07320.32
5.6.170.0300.05720.54
5.6.160.0070.06320.40
5.6.150.0130.07718.13
5.6.140.0070.04318.12
5.6.130.0070.08018.17
5.6.120.0100.03320.96
5.6.110.0100.08020.99
5.6.100.0000.04321.00
5.6.90.0100.07721.00
5.6.80.0030.07320.38
5.6.70.0200.06320.52
5.5.350.0270.08020.44
5.5.340.0100.04317.96
5.5.330.0070.05720.47
5.5.320.0000.05320.41
5.5.310.0170.09320.29
5.5.300.0070.07717.95
5.5.290.0070.07017.97
5.5.280.0030.04720.88
5.5.270.0070.08720.87
5.5.260.0070.08320.79
5.5.250.0000.05720.77
5.5.240.0030.06720.16
5.4.450.0770.05319.48
5.4.440.1030.05319.50
5.4.430.0700.06319.61
5.4.420.1070.04319.59
5.4.410.0170.05318.90
5.4.400.0430.06018.70
5.4.390.0100.06718.79
5.4.380.0330.05018.77
5.4.370.0270.05018.46
5.4.360.0230.05018.72
5.4.350.1400.05318.50
5.4.340.0130.06318.70
5.4.320.0200.05718.58
5.4.310.0170.06318.77
5.4.300.1400.06018.72
5.4.290.0200.05318.73
5.4.280.0200.05318.60
5.4.270.1370.04718.58
5.4.260.0230.05018.49
5.4.250.0300.04718.71
5.4.240.0230.04718.49
5.4.230.0170.05318.70
5.4.220.0670.04018.68
5.4.210.0200.05018.45
5.4.200.0200.04716.55
5.4.190.0170.05318.64
5.4.180.0130.05718.50
5.4.170.0870.03718.48
5.4.160.0200.05318.65
5.4.150.1200.05718.61
5.4.140.0270.05016.27
5.4.130.0130.05716.30
5.4.120.1200.04716.21
5.4.110.0230.05016.06
5.4.100.0300.05016.09
5.4.90.0170.05716.26
5.4.80.0300.04716.21
5.4.70.0200.05016.29
5.4.60.1030.06016.06
5.4.50.0300.06016.22
5.4.40.0270.06316.24
5.4.30.0300.06316.32
5.4.20.0330.06716.11
5.4.10.0200.06016.22
5.4.00.0200.04715.68
5.3.290.0570.04014.75
5.3.280.0270.04714.51
5.3.270.0200.05014.68
5.3.260.0230.05014.71
5.3.250.0200.05314.58
5.3.240.1300.05014.52
5.3.230.0300.05014.70
5.3.220.0200.05714.60
5.3.210.0170.05714.64
5.3.200.0430.05014.52
5.3.190.0130.06014.67
5.3.180.0130.05314.59
5.3.170.0930.04714.64
5.3.160.0900.05314.48
5.3.150.0100.06314.56
5.3.140.0230.05314.47
5.3.130.0330.06714.58
5.3.120.0170.06014.60
5.3.110.0130.06014.46
5.3.100.0200.05713.95
5.3.90.0230.06014.12
5.3.80.0230.05714.09
5.3.70.1200.05713.93
5.3.60.0070.06313.98
5.3.50.0100.05713.94
5.3.40.0370.03013.91
5.3.30.0270.04013.91
5.3.20.0030.06313.65
5.3.10.0270.04013.69
5.3.00.0200.05313.74
5.2.170.0130.05011.17
5.2.160.0170.04011.37
5.2.150.0030.05311.18
5.2.140.0130.04311.21
5.2.130.0130.04711.02
5.2.120.0230.05011.32
5.2.110.0200.03711.13
5.2.100.0200.03311.15
5.2.90.0130.04311.10
5.2.80.0130.04711.18
5.2.70.0170.04311.17
5.2.60.0170.05311.11
5.2.50.0100.04711.05
5.2.40.0170.03711.03
5.2.30.0130.04311.13
5.2.20.0130.04010.98
5.2.10.0300.05710.84
5.2.00.1530.04010.73
5.1.60.0200.03310.06
5.1.50.0100.03710.12
5.1.40.0170.03310.09
5.1.30.1330.03710.38
5.1.20.0230.03010.49
5.1.10.0100.04010.10
5.1.00.0170.03310.11
5.0.50.0070.0378.59
5.0.40.0070.0308.48
5.0.30.0100.0438.21
5.0.20.0030.0338.27
5.0.10.0070.0308.22
5.0.00.0100.0438.19
4.4.90.0100.0205.86
4.4.80.0070.0235.93
4.4.70.0030.0275.93
4.4.60.0030.0275.89
4.4.50.0100.0205.91
4.4.40.0130.0305.92
4.4.30.0100.0205.90
4.4.20.0070.0235.97
4.4.10.0070.0235.97
4.4.00.0130.0305.95
4.3.110.0000.0335.80
4.3.100.0100.0275.80
4.3.90.0100.0205.84
4.3.80.0100.0335.82
4.3.70.0100.0175.79
4.3.60.0070.0205.88
4.3.50.0030.0235.82
4.3.40.0030.0375.77
4.3.30.0000.0274.58
4.3.20.0000.0274.52
4.3.10.0030.0234.58
4.3.00.0130.0236.95