3v4l.org

run code in 300+ PHP versions simultaneously
<?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>){3})</div>|'; $matches = array(); echo('result='.intval(preg_match($re, $string, $matches))."\n"); echo('$matches='); print_r($matches); $re = '|(?<=</a>)(?=<a)|'; $pieces = preg_split($re, $matches[1]); echo('$pieces='); print_r($pieces);

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).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0040.01816.75
8.3.50.0140.00522.17
8.3.40.0040.01518.73
8.3.30.0060.00918.92
8.3.20.0040.00420.30
8.3.10.0080.00021.77
8.3.00.0060.00319.50
8.2.180.0110.01118.79
8.2.170.0060.00922.96
8.2.160.0070.01320.39
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0070.01026.16
8.2.120.0050.00319.61
8.2.110.0060.00321.12
8.2.100.0080.00418.00
8.2.90.0000.00819.36
8.2.80.0080.00017.97
8.2.70.0040.00417.88
8.2.60.0030.00617.93
8.2.50.0060.00318.07
8.2.40.0000.01118.03
8.2.30.0050.00218.22
8.2.20.0000.00718.03
8.2.10.0000.00818.21
8.2.00.0000.00818.02
8.1.280.0110.01125.92
8.1.270.0090.00020.68
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0070.00319.31
8.1.230.0080.00418.89
8.1.220.0040.00417.91
8.1.210.0040.00418.77
8.1.200.0040.00417.35
8.1.190.0000.00817.35
8.1.180.0000.00918.10
8.1.170.0030.00620.57
8.1.160.0040.00422.00
8.1.150.0040.00418.92
8.1.140.0040.00417.62
8.1.130.0030.00617.63
8.1.120.0030.00517.61
8.1.110.0000.00817.53
8.1.100.0040.00417.67
8.1.90.0030.00517.46
8.1.80.0040.00417.64
8.1.70.0030.00317.50
8.1.60.0090.00017.77
8.1.50.0040.00417.68
8.1.40.0000.00817.74
8.1.30.0040.00417.76
8.1.20.0040.00417.73
8.1.10.0030.00617.70
8.1.00.0050.00217.69
8.0.300.0080.00018.77
8.0.290.0040.00417.00
8.0.280.0000.00818.48
8.0.270.0000.00817.33
8.0.260.0000.00716.96
8.0.250.0050.00217.05
8.0.240.0080.00017.16
8.0.230.0070.00017.25
8.0.220.0050.00217.02
8.0.210.0030.00517.05
8.0.200.0000.00617.23
8.0.190.0000.00817.01
8.0.180.0040.00417.10
8.0.170.0000.00817.02
8.0.160.0000.00717.11
8.0.150.0030.00317.01
8.0.140.0050.00216.96
8.0.130.0000.00613.58
8.0.120.0040.00417.00
8.0.110.0030.00517.10
8.0.100.0000.00716.98
8.0.90.0000.00717.05
8.0.80.0090.00617.18
8.0.70.0040.00416.92
8.0.60.0070.00017.05
8.0.50.0060.00316.98
8.0.30.0120.01117.32
8.0.20.0080.01217.55
8.0.10.0040.00417.24
8.0.00.0160.00316.80
7.4.330.0030.00315.05
7.4.320.0030.00516.72
7.4.300.0030.00316.71
7.4.290.0000.00716.65
7.4.280.0000.01016.71
7.4.270.0040.00416.81
7.4.260.0020.00516.72
7.4.250.0000.00716.79
7.4.240.0030.00516.74
7.4.230.0070.00016.62
7.4.220.0070.01116.82
7.4.210.0090.00616.71
7.4.200.0040.00416.52
7.4.160.0090.00916.59
7.4.150.0070.01017.40
7.4.140.0100.00717.86
7.4.130.0070.01216.71
7.4.120.0110.00616.67
7.4.110.0120.00616.69
7.4.100.0090.00916.85
7.4.90.0130.00316.64
7.4.80.0080.01419.39
7.4.70.0160.00616.71
7.4.60.0090.00616.74
7.4.50.0030.00616.54
7.4.40.0150.00316.82
7.4.30.0080.00916.86
7.4.00.0100.00314.89
7.3.330.0050.00013.23
7.3.320.0080.00813.39
7.3.310.0070.00016.59
7.3.300.0000.00816.47
7.3.290.0090.00616.39
7.3.280.0060.01016.46
7.3.270.0140.00417.40
7.3.260.0180.00716.53
7.3.250.0070.01116.50
7.3.240.0090.01116.44
7.3.230.0060.01216.52
7.3.210.0060.01016.46
7.3.200.0120.00619.39
7.3.190.0120.00916.89
7.3.180.0120.00616.70
7.3.170.0120.00816.67
7.3.160.0000.01616.40
7.2.330.0080.01216.99
7.2.320.0130.00316.70
7.2.310.0120.00616.91
7.2.300.0080.00816.89
7.2.290.0090.01516.79
7.2.00.0100.00719.66
7.1.100.0000.01218.22
7.1.70.0030.00617.52
7.1.60.0100.01419.50
7.1.50.0090.01217.23
7.1.00.0030.07722.45
7.0.200.0070.00714.82
7.0.140.0130.06021.95
7.0.60.0070.04319.97
7.0.50.0070.06717.91
7.0.40.0030.04320.07
7.0.30.0300.05020.33
7.0.20.0170.04320.12
7.0.10.0030.07720.11
7.0.00.0070.08320.11
5.6.210.0070.08020.70
5.6.200.0070.04018.23
5.6.190.0130.07720.51
5.6.180.0070.06720.52
5.6.170.0300.04320.60
5.6.160.0000.06320.51
5.6.150.0100.06718.20
5.6.140.0030.04318.18
5.6.130.0100.07318.29
5.6.120.0100.07321.04
5.6.110.0100.08020.98
5.6.100.0030.07720.98
5.6.90.0030.05321.11
5.6.80.0030.07320.33
5.5.350.4300.04020.38
5.5.340.0130.07718.02
5.5.330.0100.08720.41
5.5.320.0200.04020.52
5.5.310.0270.05020.32
5.5.300.0000.04317.98
5.5.290.0030.07017.96
5.5.280.0070.08720.64
5.5.270.0030.04020.95
5.5.260.0170.05320.72
5.5.250.0030.08720.57
5.5.240.0170.07320.06
5.4.450.0170.05319.45
5.4.440.0900.05319.50
5.4.430.0770.05719.58
5.4.420.0900.04719.45
5.4.410.0170.06319.41
5.4.400.0170.06018.80
5.4.390.0270.05718.79
5.4.380.0230.06018.79
5.4.370.0300.06018.71
5.4.360.0230.05718.60
5.4.350.0230.05018.59
5.4.340.0170.05318.81
5.4.320.0100.06318.84
5.4.310.0230.07018.51
5.4.300.0330.06018.59
5.4.290.0230.05718.79
5.4.280.0200.05718.53
5.4.270.0200.06018.72
5.4.260.0300.05318.55
5.4.250.0330.04018.74
5.4.240.0130.06018.61
5.4.230.0230.06718.46
5.4.220.0170.07018.80
5.4.210.0170.06718.68
5.4.200.0370.03016.64
5.4.190.0330.04018.83
5.4.180.0270.05018.76
5.4.170.0270.05718.71
5.4.160.0170.07318.75
5.4.150.0130.06318.67
5.4.140.0130.07316.48
5.4.130.0130.06716.34
5.4.120.0170.05316.46
5.4.110.0100.05716.20
5.4.100.0200.05716.27
5.4.90.0230.05316.26
5.4.80.0270.04716.20
5.4.70.0230.05016.20
5.4.60.0230.05016.24
5.4.50.0300.04016.41
5.4.40.0230.04716.21
5.4.30.0130.06716.40
5.4.20.0300.04316.25
5.4.10.0200.06716.38
5.4.00.0130.06015.89
5.3.290.0270.04714.65
5.3.280.0230.04714.70
5.3.270.0170.06314.81
5.3.260.0130.06014.80
5.3.250.0300.06014.59
5.3.240.0230.05314.66
5.3.230.0230.05714.69
5.3.220.0130.06014.67
5.3.210.0130.06314.66
5.3.200.0270.04714.70
5.3.190.0170.05714.56
5.3.180.0230.05014.79
5.3.170.0330.04314.67
5.3.160.0230.05314.66
5.3.150.0230.07714.77
5.3.140.0270.06314.66
5.3.130.0130.06314.61
5.3.120.0270.07014.66
5.3.110.0300.05014.68
5.3.100.0230.04714.21
5.3.90.0170.06014.01
5.3.80.0230.05014.02
5.3.70.0230.04314.02
5.3.60.0100.06314.14
5.3.50.0230.05014.17
5.3.40.0300.05014.24
5.3.30.0270.04013.89
5.3.20.0300.06313.69
5.3.10.0270.04713.78
5.3.00.0270.05313.76
5.2.170.0130.04311.20
5.2.160.0170.04711.12
5.2.150.0200.04311.25
5.2.140.0130.05011.20
5.2.130.0030.05711.11
5.2.120.0130.05011.08
5.2.110.0130.04311.13
5.2.100.0230.03311.09
5.2.90.0130.04311.19
5.2.80.0200.03711.11
5.2.70.0230.03311.07
5.2.60.0200.03711.04
5.2.50.0200.04011.23
5.2.40.0100.05711.13
5.2.30.0130.04711.12
5.2.20.0100.04310.97
5.2.10.0100.04310.90
5.2.00.0270.03310.81
5.1.60.0100.03710.11
5.1.50.0130.04310.05
5.1.40.0200.04310.19
5.1.30.0130.04310.33
5.1.20.0100.04010.46
5.1.10.0130.03710.26
5.1.00.0230.02710.10
5.0.50.0170.0208.56
5.0.40.0100.0278.52
5.0.30.0200.0408.42
5.0.20.0070.0308.41
5.0.10.0170.0238.30
5.0.00.0070.0478.20
4.4.90.0130.0176.80
4.4.80.0030.0276.80
4.4.70.0100.0206.80
4.4.60.0070.0236.80
4.4.50.0130.0206.80
4.4.40.0100.0436.80
4.4.30.0100.0236.80
4.4.20.0030.0276.80
4.4.10.0030.0276.80
4.4.00.0100.0376.80
4.3.110.0130.0206.80
4.3.100.0030.0276.80
4.3.90.0100.0206.80
4.3.80.0100.0336.80
4.3.70.0100.0176.80
4.3.60.0070.0206.80
4.3.50.0130.0206.80
4.3.40.0100.0336.80
4.3.30.0030.0276.80
4.3.20.0100.0276.80
4.3.10.0030.0236.80
4.3.00.0030.0206.82

preferences:
45.88 ms | 401 KiB | 5 Q