3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $exception = ['will not'=>'will&nbs;pnot']; $string = 'They will not begin'; function r($s, $a){ $string = strtr($string, $exception); $array = explode(' ', $string); $array = array_combine(array_values($array), array_values($array)); $array = array_replace($array, array_intersect($array, array_flip($exception))); return array_values($array); } var_dump(f($string, $exception));
based on uVHIR

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.0020.01216.54
7.3.00.0030.01016.50
7.2.130.0080.00816.65
7.2.120.0160.00316.84
7.2.110.0090.00316.76
7.2.100.0040.00916.48
7.2.90.0100.00716.80
7.2.80.0090.00616.87
7.2.70.0030.00816.75
7.2.60.0050.01116.88
7.2.50.0060.00616.61
7.2.40.0050.01116.84
7.2.30.0120.00716.72
7.2.20.0070.00916.70
7.2.10.0100.00516.70
7.2.00.0030.01117.51
7.1.250.0080.00315.57
7.1.200.0040.00815.46
7.1.100.0000.01518.14
7.1.70.0050.00316.82
7.1.60.0140.01120.03
7.1.50.0040.01916.72
7.1.00.0070.07022.48
7.0.200.0130.00316.73
7.0.110.0130.06320.00
7.0.100.0000.05719.96
7.0.90.0030.04720.08
7.0.80.0100.03719.95
7.0.70.0070.06020.04
7.0.60.0100.05019.63
7.0.50.0070.03720.44
7.0.40.0070.07320.22
7.0.30.0130.07720.16
7.0.20.0100.07720.08
7.0.10.0100.08020.27
7.0.00.0030.08320.23
5.6.280.0000.05020.81
5.6.260.0070.04320.66
5.6.250.0030.06320.75
5.6.240.0070.04720.63
5.6.230.0030.06320.55
5.6.220.0030.04320.68
5.6.210.0070.04720.66
5.6.200.0030.04321.16
5.6.190.0030.04020.95
5.6.180.0100.07321.22
5.6.170.0170.07321.22
5.6.160.0030.06721.09
5.6.150.0070.08021.23
5.6.140.0070.07721.08
5.6.130.0030.05721.27
5.6.120.0070.07720.91
5.6.110.0130.08320.95
5.6.100.0200.07720.92
5.6.90.0070.07721.08
5.6.80.0100.04320.49
5.6.70.0100.07720.65
5.6.60.0070.08020.31
5.6.50.0070.08020.53
5.6.40.0030.08320.46
5.6.30.0070.08320.39
5.6.20.0170.07320.43
5.6.10.0130.08020.50
5.6.00.0170.07020.46
5.5.380.0000.04720.58
5.5.370.0070.04720.38
5.5.360.0030.04020.25
5.5.350.0030.05020.48
5.5.340.0100.03720.78
5.5.330.0030.04020.81
5.5.320.0070.03720.73
5.5.310.0000.04720.95
5.5.300.0230.06720.96
5.5.290.0070.08320.91
5.5.280.0130.07720.90
5.5.270.0030.08720.74
5.5.260.0030.08020.89
5.5.250.0130.07320.52
5.5.240.0130.07020.34
5.5.230.0170.07020.41
5.5.220.0100.07320.05
5.5.210.0000.08020.35
5.5.200.0200.07020.31
5.5.190.0070.07320.30
5.5.180.0170.07020.16
5.5.160.0170.07020.22
5.5.150.0070.05020.12
5.5.140.0100.07720.30
5.5.130.0100.07720.12
5.5.120.0030.08020.16
5.5.110.0130.07720.38
5.5.100.0100.04319.96
5.5.90.0030.08020.25
5.5.80.0070.07720.23
5.5.70.0070.07320.10
5.5.60.0070.07320.16
5.5.50.0230.06020.11
5.5.40.0000.07719.97
5.5.30.0100.07720.09
5.5.20.0030.08020.24
5.5.10.0030.08019.96
5.5.00.0170.07020.03
5.4.450.0130.07319.51
5.4.440.0070.07719.57
5.4.430.0170.07319.27
5.4.420.0100.07019.33
5.4.410.0130.07319.42
5.4.400.0000.08719.17
5.4.390.0030.07719.32
5.4.380.0070.08019.02
5.4.370.0070.07319.26
5.4.360.0130.07018.98
5.4.350.0170.03719.01
5.4.340.0070.07719.01
5.4.320.0100.07018.95
5.4.310.0100.07019.16
5.4.300.0070.07718.98
5.4.290.0070.07319.18
5.4.280.0130.07018.98
5.4.270.0030.08019.02
5.4.260.0070.04719.09
5.4.250.0130.07319.08
5.4.240.0070.07319.17
5.4.230.0100.07019.00
5.4.220.0100.06019.30
5.4.210.0100.07018.98
5.4.200.0070.07019.30
5.4.190.0100.07319.15
5.4.180.0100.07319.00
5.4.170.0070.07019.05
5.4.160.0100.07018.97
5.4.150.0070.07719.16
5.4.140.0000.07316.48
5.4.130.0100.07316.32
5.4.120.0100.03716.46
5.4.110.0070.07316.51
5.4.100.0070.07016.61
5.4.90.0070.03316.54
5.4.80.0030.08016.57
5.4.70.0130.06316.58
5.4.60.0070.04716.45
5.4.50.0030.04316.55
5.4.40.0230.03316.58
5.4.30.0000.05016.56
5.4.20.0100.06716.54
5.4.10.0070.07016.41
5.4.00.0000.06015.78