3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php print get_domain("http://somedomain.co.uk"); // outputs 'somedomain.co.uk' function get_domain($url) { $pieces = parse_url($url); $domain = isset($pieces['host']) ? $pieces['host'] : ''; if (preg_match('/(?P<domain>[a-z0-9][a-z0-9\-]{1,63}\.[a-z\.]{2,6})$/i', $domain, $regs)) { return $regs['domain']; } return false; }

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.0090.00619.61
7.1.100.0640.00616.14
7.1.70.0030.00517.35
7.1.60.0070.01719.82
7.1.50.0070.01817.16
7.1.00.0070.07322.46
7.0.200.0030.01416.87
7.0.140.0000.05022.00
7.0.60.0170.07019.95
7.0.50.0070.05717.88
7.0.40.0030.07720.07
7.0.30.0470.06720.26
7.0.20.0070.05020.11
7.0.10.0130.06020.10
7.0.00.0170.08020.25
5.6.210.0130.07720.72
5.6.200.0100.08018.25
5.6.190.0070.04020.48
5.6.180.0230.06320.66
5.6.170.0330.06720.62
5.6.160.0070.04320.47
5.6.150.0170.04718.19
5.6.140.0000.06718.21
5.6.130.0130.05018.18
5.6.120.0100.04720.90
5.6.110.0100.04021.00
5.6.100.0030.08721.00
5.6.90.0030.06021.02
5.6.80.0070.05320.40
5.5.350.0300.07320.44
5.5.340.0070.05717.98
5.5.330.0000.04720.44
5.5.320.0330.04320.34
5.5.310.0200.03320.28
5.5.300.0030.05017.98
5.5.290.0030.05317.96
5.5.280.0070.08720.89
5.5.270.0200.08020.83
5.5.260.0030.09020.88
5.5.250.0000.05720.59
5.5.240.0270.03320.24
5.4.450.0970.04719.20
5.4.440.0730.03319.57
5.4.430.0730.03719.52
5.4.420.0700.03719.56
5.4.410.0430.04719.42
5.4.400.0600.04019.08
5.4.390.0070.03718.84
5.4.380.0200.06318.75
5.4.370.0270.05718.80
5.4.360.0370.05318.47
5.4.350.0300.06018.53
5.4.340.0370.05018.79
5.4.320.0080.03912.51
5.4.310.0070.04312.50
5.4.300.0040.04312.50
5.4.290.0040.04712.50
5.4.280.0080.03612.40
5.4.270.0230.05718.95
5.4.260.0030.06719.10
5.4.250.0100.07318.97
5.4.240.0100.06019.09
5.4.230.0170.07318.91
5.4.220.0130.07718.92
5.4.210.0170.06319.00
5.4.200.0100.07318.99
5.4.190.0270.05718.94
5.4.180.0200.07019.00
5.4.170.0130.06319.09
5.4.160.0170.06319.12
5.4.150.0100.06318.98
5.4.140.0130.06016.40
5.4.130.0200.05716.61
5.4.120.0130.07716.69
5.4.110.0100.07716.57
5.4.100.0130.06716.64
5.4.90.0130.04716.71
5.4.80.0100.07316.63
5.4.70.0130.06316.63
5.4.60.0130.07316.50
5.4.50.0200.06316.55
5.4.40.0200.06316.59
5.4.30.0070.07016.61
5.4.20.0100.05016.49
5.4.10.0100.06016.40
5.4.00.0130.06016.07
5.3.290.0040.04212.80
5.3.280.0170.06314.87
5.3.270.0130.07314.87
5.3.260.0130.05714.69
5.3.250.0100.06314.86
5.3.240.0230.04714.87
5.3.230.0070.06014.59
5.3.220.0200.06314.63
5.3.210.0100.06014.74
5.3.200.0030.06314.76
5.3.190.0170.04714.63
5.3.180.0100.07314.61
5.3.170.0070.05714.47
5.3.160.0170.06714.78
5.3.150.0170.06014.84
5.3.140.0070.06714.74
5.3.130.0170.06014.72
5.3.120.0100.06314.77
5.3.110.0100.07314.82
5.3.100.0070.06713.91
5.3.90.0200.05314.27
5.3.80.0070.07014.19
5.3.70.0070.07014.25
5.3.60.0100.06314.06
5.3.50.0100.06014.15
5.3.40.0130.06314.24
5.3.30.0070.06013.95
5.3.20.0070.06713.98
5.3.10.0100.07013.85
5.3.00.0100.06713.70
5.2.170.0030.05311.14
5.2.160.0070.06011.33
5.2.150.0170.04011.40
5.2.140.0070.05011.33
5.2.130.0170.05011.21
5.2.120.0000.06711.30
5.2.110.0170.04011.28
5.2.100.0170.03711.32
5.2.90.0070.04711.30
5.2.80.0100.05311.37
5.2.70.0100.05711.27
5.2.60.0000.06311.36
5.2.50.0030.06011.07
5.2.40.0170.04311.06
5.2.30.0100.05311.09
5.2.20.0100.05311.08
5.2.10.0000.05011.14
5.2.00.0170.04710.91
5.1.60.0000.05010.30
5.1.50.0030.0379.98
5.1.40.0130.04010.13
5.1.30.0130.04310.38
5.1.20.0130.03310.52
5.1.10.0130.03010.39
5.1.00.0070.05010.37
5.0.50.0100.0278.73
5.0.40.0070.0408.69
5.0.30.0030.0578.37
5.0.20.0100.0278.29
5.0.10.0100.0308.16
5.0.00.0030.0508.24
4.4.90.0030.0306.29
4.4.80.0100.0236.29
4.4.70.0030.0206.29
4.4.60.0100.0306.29
4.4.50.0030.0236.29
4.4.40.0030.0336.29
4.4.30.0100.0176.29
4.4.20.0000.0336.29
4.4.10.0000.0336.29
4.4.00.0000.0406.29
4.3.110.0030.0236.29
4.3.100.0070.0206.29
4.3.90.0030.0276.29
4.3.80.0070.0336.29
4.3.70.0000.0336.29
4.3.60.0030.0306.29
4.3.50.0030.0306.29
4.3.40.0070.0306.29
4.3.30.0030.0306.29
4.3.20.0070.0206.29
4.3.10.0100.0206.29
4.3.00.0030.02015.58