3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $string = '<div><a href=%http://link1%><img></a><a href=%http://link2%><img></a><a href=%http://link3%><img></a></div>'; $re = '|<div>(<a((?!href)(?!<).)+?href=%([^%]+?)%((?!</a>).)+?</a>){2}</div>|'; $matches = array(); echo('result='.intval(preg_match($re, $string, $matches))."\n"); echo('$matches='); print_r($matches);
based on 2D5Ok

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.0100.00619.65
7.1.100.0030.00618.28
7.1.70.0000.00917.38
7.1.60.0030.02219.50
7.1.50.0070.01316.71
7.1.00.0000.08022.50
7.0.200.0130.00715.04
7.0.140.0000.07722.15
7.0.60.0130.05019.89
7.0.50.0100.07717.97
7.0.40.0070.08320.18
7.0.30.0200.04020.12
7.0.20.0270.05320.18
7.0.10.0330.04720.15
7.0.00.0070.08720.15
5.6.280.0030.07020.80
5.6.210.0070.06020.50
5.6.200.0100.07718.08
5.6.190.0170.07020.43
5.6.180.0300.07720.24
5.6.170.1670.04720.39
5.6.160.0170.07320.45
5.6.150.0000.08718.21
5.6.140.0000.04018.21
5.6.130.0030.05318.14
5.6.120.0000.04721.11
5.6.110.0100.06020.97
5.6.100.0100.07720.97
5.6.90.0130.05020.96
5.6.80.0000.08720.41
5.6.70.0100.05720.51
5.5.350.0070.04020.52
5.5.340.0070.05317.98
5.5.330.0170.07720.13
5.5.320.0230.07320.16
5.5.310.0300.07020.50
5.5.300.0070.04018.02
5.5.290.0030.09017.95
5.5.280.0070.08020.84
5.5.270.0070.05720.75
5.5.260.0100.08020.86
5.5.250.0130.08320.70
5.5.240.0100.06720.25
5.4.450.0170.05319.47
5.4.440.0800.07019.47
5.4.430.1000.05719.46
5.4.420.0730.06319.63
5.4.410.1000.05719.42
5.4.400.0900.06718.62
5.4.390.0930.06318.56
5.4.380.0830.06018.57
5.4.370.0830.05018.78
5.4.360.0700.05018.46
5.4.350.0870.05318.78
5.4.340.0930.04718.50
5.4.320.0800.07718.43
5.4.310.1100.06318.50
5.4.300.1030.05318.62
5.4.290.1030.05318.71
5.4.280.0970.05318.68
5.4.270.0800.05718.72
5.4.260.0630.05318.44
5.4.250.0830.05718.56
5.4.240.1070.05718.68
5.4.230.0830.05718.70
5.4.220.0900.05018.60
5.4.210.0600.06318.61
5.4.200.0800.04316.48
5.4.190.0770.05318.78
5.4.180.0730.06018.70
5.4.170.0800.06318.60
5.4.160.0770.06018.76
5.4.150.0770.06318.70
5.4.140.1030.06716.31
5.4.130.0930.05316.13
5.4.120.0900.05316.31
5.4.110.0800.05316.32
5.4.100.1100.07016.31
5.4.90.1270.06316.06
5.4.80.0870.05716.25
5.4.70.0930.06016.19
5.4.60.1130.06016.01
5.4.50.1000.08316.22
5.4.40.0730.05016.32
5.4.30.0830.05016.32
5.4.20.0730.06016.13
5.4.10.0700.06016.03
5.4.00.0770.05015.70
5.3.290.0770.06314.82
5.3.280.1000.06014.69
5.3.270.1070.07014.75
5.3.260.0970.05314.68
5.3.250.1130.04314.52
5.3.240.0870.06314.51
5.3.230.1070.06314.59
5.3.220.0970.04714.65
5.3.210.0900.06014.65
5.3.200.0870.05014.64
5.3.190.0870.06014.64
5.3.180.0870.06714.52
5.3.170.0800.06014.48
5.3.160.0700.05314.66
5.3.150.0800.05014.56
5.3.140.0630.07014.59
5.3.130.0670.05714.46
5.3.120.0870.07714.53
5.3.110.0900.06014.60
5.3.100.0800.05014.07
5.3.90.0830.04713.93
5.3.80.0800.06014.00
5.3.70.0730.05014.01
5.3.60.0930.06013.91
5.3.50.0830.05014.02
5.3.40.0770.06013.88
5.3.30.0570.06013.94
5.3.20.0770.04313.64
5.3.10.0730.05313.64
5.3.00.0770.05013.54
5.2.170.0230.04711.20
5.2.160.0530.03311.12
5.2.150.0700.04311.12
5.2.140.0700.04311.19
5.2.130.0600.04711.31
5.2.120.0630.04711.02
5.2.110.0730.05011.09
5.2.100.0570.04711.05
5.2.90.0630.04711.17
5.2.80.0630.04711.07
5.2.70.0630.04311.02
5.2.60.0600.05311.07
5.2.50.0600.04310.94
5.2.40.0530.03711.05
5.2.30.0500.04310.96
5.2.20.0600.04710.90
5.2.10.0630.04310.93
5.2.00.0530.04710.80
5.1.60.0600.03710.02
5.1.50.0530.03310.18
5.1.40.0570.0339.96
5.1.30.0630.03310.38
5.1.20.0370.04710.46
5.1.10.0370.03710.11
5.1.00.0500.03710.16
5.0.50.0300.0308.58
5.0.40.0370.0278.43
5.0.30.0400.0438.40
5.0.20.0330.0308.24
5.0.10.0270.0278.17
5.0.00.0230.0508.27
4.4.90.0300.0236.45
4.4.80.0230.0306.45
4.4.70.0330.0276.45
4.4.60.0330.0336.45
4.4.50.0230.0276.45
4.4.40.0270.0436.45
4.4.30.0200.0406.45
4.4.20.0270.0206.45
4.4.10.0400.0176.45
4.4.00.0200.0406.46
4.3.110.0100.0236.46
4.3.100.0200.0206.46
4.3.90.0230.0276.46
4.3.80.0230.0376.46
4.3.70.0130.0376.46
4.3.60.0300.0206.61
4.3.50.0200.0176.61
4.3.40.0300.0436.78
4.3.30.0170.0276.78
4.3.20.0170.0236.78
4.3.10.0070.0206.78
4.3.00.0030.0206.82