3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php //$utf8string = '测试杂志hello123等々'; $utf8string = '测试杂志'; $utf8string = mb_substr('测试杂志', 0, 10, 'UTF-8'); echo $utf8string; //$var = 'hello123'; //$pos = strpos($utf8string, $var); //if ($pos!==false) { //echo substr($utf8string, 0, 10); //}
based on XYeXS

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.2.00.0030.00619.45
7.1.200.0060.00915.79
7.1.100.0000.01117.91
7.1.70.0040.00417.05
7.1.60.0060.00616.98
7.1.50.0070.01716.91
7.1.00.0200.05722.32
7.0.200.0000.00816.64
7.0.140.0100.07021.92
7.0.60.0130.07319.84
7.0.50.0070.08717.85
7.0.40.0000.05720.19
7.0.30.0230.08720.33
7.0.20.0300.07720.16
7.0.10.0030.06020.09
7.0.00.0130.04020.09
5.6.280.0030.07321.14
5.6.210.0070.07320.49
5.6.200.0100.04718.11
5.6.190.0030.05020.36
5.6.180.4070.04320.49
5.6.170.0300.03720.50
5.6.160.0100.08320.41
5.6.150.0070.08718.07
5.6.140.0100.08018.07
5.6.130.0100.08318.20
5.6.120.0100.08321.01
5.6.110.0100.04721.02
5.6.100.0030.04020.88
5.6.90.0070.05320.95
5.6.80.0100.05320.36
5.6.70.4600.03720.37
5.5.350.0270.04320.44
5.5.340.0030.04317.89
5.5.330.0030.04320.40
5.5.320.0270.05720.13
5.5.310.0100.04720.29
5.5.300.0030.08717.92
5.5.290.0070.04017.94
5.5.280.0070.06720.77
5.5.270.0130.08020.78
5.5.260.0170.07720.93
5.5.250.0100.04020.48
5.5.240.0330.06720.14
5.4.450.1830.04019.57
5.4.440.1900.05019.21
5.4.430.1800.04719.27
5.4.420.1830.05019.27
5.4.410.1870.04719.33
5.4.400.1000.05319.09
5.4.390.0030.07719.08
5.4.380.0230.04718.88
5.4.370.1930.03019.13
5.4.360.1970.04019.13
5.4.350.1700.04319.11
5.4.340.1870.04319.09
5.4.320.2000.04018.89
5.4.310.1900.04718.81
5.4.300.1830.04319.08
5.4.290.1600.04319.21
5.4.280.1730.05319.08
5.4.270.1970.03019.08
5.4.260.1800.04319.19
5.4.250.1600.03319.08
5.4.240.1730.03718.77
5.4.230.1600.03719.23
5.4.220.1970.04018.80
5.4.210.1830.04719.23
5.4.200.1700.03719.07
5.4.190.1800.04719.22
5.4.180.1600.03319.20
5.4.170.1900.03319.11
5.4.160.1770.03318.93
5.4.150.1630.03019.11
5.4.140.1800.03316.45
5.4.130.1770.03316.27
5.4.120.1900.03716.37
5.4.110.1670.02716.23
5.4.100.1700.03716.21
5.4.90.1630.03716.42
5.4.80.1700.03316.16
5.4.70.1930.04316.38
5.4.60.1700.03016.28
5.4.50.1670.03316.46
5.4.40.2030.03716.49
5.4.30.1630.03316.03
5.4.20.1870.03716.18
5.4.10.1630.03716.38
5.4.00.1670.03715.71
5.3.290.1700.04014.61
5.3.280.1600.04014.63
5.3.270.1670.03714.58
5.3.260.1800.04014.46
5.3.250.1600.04014.44
5.3.240.1830.04714.44
5.3.230.1700.03314.54
5.3.220.1900.04314.57
5.3.210.1670.03314.43
5.3.200.0030.03714.41
5.3.190.0130.03314.66
5.3.180.0070.04314.43
5.3.170.1000.03314.61
5.3.160.1800.03314.57
5.3.150.1730.04014.41
5.3.140.1870.04714.39
5.3.130.1530.04014.49
5.3.120.1830.04314.56
5.3.110.1830.04014.49
5.3.100.2000.04013.87
5.3.90.1830.03714.11
5.3.80.1530.04013.89
5.3.70.1770.03713.96
5.3.60.1930.03314.01
5.3.50.1630.03313.81
5.3.40.1570.03713.72
5.3.30.1730.04013.68
5.3.20.1930.03713.54
5.3.10.1830.04013.61
5.3.00.1970.03713.65
5.2.170.1370.02711.17
5.2.160.1600.03011.01
5.2.150.1670.03311.00
5.2.140.1630.04310.99
5.2.130.1570.03310.94
5.2.120.0970.03310.95
5.2.110.0100.03710.93
5.2.100.0030.06011.15
5.2.90.0530.05310.94
5.2.80.1330.03011.17
5.2.70.1500.04310.93
5.2.60.1370.02710.95
5.2.50.1600.03710.95
5.2.40.1270.03711.14
5.2.30.1300.03310.98
5.2.20.1070.02710.86
5.2.10.1170.02010.90
5.2.00.1270.03710.60
5.1.60.1300.0279.88
5.1.50.1230.0339.96
5.1.40.1070.02310.09
5.1.30.1130.02710.45
5.1.20.0970.02310.26
5.1.10.0070.02310.03
5.1.00.0070.05310.04
5.0.50.0030.0438.43
5.0.40.0000.0278.46
5.0.30.0070.0308.38
5.0.20.0230.0408.32
5.0.10.0700.0178.24
5.0.00.0570.0278.13
4.4.90.0770.0238.13
4.4.80.0670.0178.13
4.4.70.0530.0178.13
4.4.60.0670.0278.13
4.4.50.0530.0138.13
4.4.40.0570.0238.13
4.4.30.0870.0208.13
4.4.20.0800.0178.13
4.4.10.0830.0238.13
4.4.00.0800.0308.13
4.3.110.0900.0208.13
4.3.100.0730.0138.13
4.3.90.0630.0138.13
4.3.80.0770.0378.13
4.3.70.0800.0208.13
4.3.60.0570.0138.13
4.3.50.0700.0178.13
4.3.40.0600.0338.13
4.3.30.0000.0378.13
4.3.20.0000.0278.13
4.3.10.0000.0238.13
4.3.00.0030.0138.13