3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $var = "12345"; echo $var[0] . "-" . substr($var,1); echo str_replace($var[0], $var[0].'-', $var);

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.0rc40.0000.01398.97
7.3.0rc30.0980.00316.28
7.3.0beta10.0070.00312.52
7.3.0alpha10.0000.00912.75
7.2.60.0030.01016.88
7.2.00.0060.00919.19
7.1.200.0070.00315.88
7.1.100.0030.00718.23
7.1.70.0000.01017.16
7.1.60.0130.00319.40
7.1.50.0120.00916.92
7.1.00.0000.08022.33
7.0.200.0000.00816.47
7.0.140.0070.07022.12
7.0.120.0070.07322.07
7.0.60.0000.05019.92
7.0.50.0070.06317.80
7.0.40.0070.09320.23
7.0.30.0230.08020.09
7.0.20.0270.04320.22
7.0.10.0030.04320.33
7.0.00.0030.09020.18
5.6.210.0030.07020.70
5.6.200.0030.07018.19
5.6.190.0000.05720.39
5.6.180.0300.07720.41
5.6.170.0130.04720.38
5.6.160.0130.07720.37
5.6.150.0070.07718.16
5.6.140.0000.08718.18
5.6.130.0100.03318.21
5.6.120.0030.05321.08
5.6.110.0030.05320.95
5.6.100.0130.07020.88
5.6.90.0070.08020.89
5.6.80.0030.06720.35
5.6.70.4500.03320.50
5.5.350.0030.05720.45
5.5.340.0170.06717.88
5.5.330.0130.07720.23
5.5.320.0270.03320.18
5.5.310.0370.07720.13
5.5.300.0030.08018.02
5.5.290.0000.04317.91
5.5.280.0100.08020.76
5.5.270.0030.04020.64
5.5.260.0100.05720.86
5.5.250.0000.08020.54
5.5.240.0000.03320.15
5.4.450.0100.06719.11
5.4.440.0100.06319.15
5.4.430.0030.08019.11
5.4.420.0100.05319.52
5.4.410.0000.04719.37
5.4.400.0070.07719.18
5.4.390.0030.03719.18
5.4.380.0030.08019.11
5.4.370.0100.06319.18
5.4.360.0000.05019.08
5.4.350.0030.08019.14
5.4.340.0100.05018.79
5.4.320.0070.07719.17
5.4.310.0030.06018.78
5.4.300.0070.05019.13
5.4.290.0030.04019.08
5.4.280.0100.06719.13
5.4.270.0100.07319.20
5.4.260.0100.06019.07
5.4.250.0000.04318.90
5.4.240.0100.07319.15
5.4.230.0030.04018.78
5.4.220.0130.07019.13
5.4.210.0170.06318.99
5.4.200.0100.07318.80
5.4.190.0130.07018.80
5.4.180.0100.07719.07
5.4.170.0070.04719.20
5.4.160.0130.06319.13
5.4.150.0070.08019.20
5.4.140.0070.05716.37
5.4.130.0070.07316.28
5.4.120.0070.06716.29
5.4.110.0070.05016.37
5.4.100.0100.03716.28
5.4.90.0100.06716.27
5.4.80.0070.06016.25
5.4.70.0100.03316.23
5.4.60.0130.03016.25
5.4.50.0030.03716.25
5.4.40.0030.03316.38
5.4.30.0070.03016.34
5.4.20.0000.03716.38
5.4.10.0070.03316.30
5.4.00.0030.03315.73
5.3.290.0130.07314.50
5.3.280.0030.07314.41
5.3.270.0000.05714.53
5.3.260.0100.07714.57
5.3.250.0070.07314.62
5.3.240.0030.07314.57
5.3.230.0100.06714.68
5.3.220.0070.07714.38
5.3.210.0030.08014.52
5.3.200.0130.05714.48
5.3.190.0100.07314.52
5.3.180.0130.07014.51
5.3.170.0100.05014.48
5.3.160.0000.04014.64
5.3.150.0070.03314.44
5.3.140.0030.03714.49
5.3.130.0030.03714.51
5.3.120.0000.04014.47
5.3.110.0070.03714.36
5.3.100.0030.03714.12
5.3.90.0030.04713.94
5.3.80.0100.06313.94
5.3.70.0030.05014.12
5.3.60.0070.05313.96
5.3.50.0100.05013.96
5.3.40.0030.03313.78
5.3.30.0030.03713.92
5.3.20.0000.03713.53
5.3.10.0030.03313.58
5.3.00.0000.03713.58
5.2.170.0100.05711.08
5.2.160.0000.04711.02
5.2.150.0070.03011.02
5.2.140.0070.02311.04
5.2.130.0000.05311.00
5.2.120.0030.02710.98
5.2.110.0030.02711.04
5.2.100.0030.02711.11
5.2.90.0000.03011.11
5.2.80.0000.03010.95
5.2.70.0030.02711.04
5.2.60.0000.03010.96
5.2.50.0030.02711.18
5.2.40.0030.02710.87
5.2.30.0070.02310.92
5.2.20.0030.02710.90
5.2.10.0000.03010.75
5.2.00.0030.02710.70
5.1.60.0100.01710.03
5.1.50.0000.0279.91
5.1.40.0070.02010.05
5.1.30.0000.02710.33
5.1.20.0030.02310.34
5.1.10.0030.02310.07
5.1.00.0000.03010.06
5.0.50.0000.0238.84
5.0.40.0000.0208.84
5.0.30.0000.0308.84
5.0.20.0030.0308.84
5.0.10.0000.0338.84
5.0.00.0030.0408.84
4.4.90.0070.0108.84
4.4.80.0030.0138.84
4.4.70.0030.0138.84
4.4.60.0000.0178.84
4.4.50.0000.0178.84
4.4.40.0000.0238.84
4.4.30.0000.0178.84
4.4.20.0030.0178.84
4.4.10.0030.0138.84
4.4.00.0000.0238.84
4.3.110.0000.0138.84
4.3.100.0000.0178.84
4.3.90.0000.0208.84
4.3.80.0030.0438.84
4.3.70.0030.0278.84
4.3.60.0000.0378.84
4.3.50.0030.0338.84
4.3.40.0100.0508.84
4.3.30.0000.0238.84
4.3.20.0000.0378.84
4.3.10.0030.0338.84
4.3.00.0030.0138.84