3v4l.org

run code in 300+ PHP versions simultaneously
<?php $hrefPattern = '/<a\\s+([^>]*)href=(["\']??)([^"\'>]*?)\\2([^>]*)>(.*)<\\/a>/siU'; $html = <<<HTML <p>If you find any cases where this code falls down, let us know using the Feedback link below.</p> <p>Before using this or similar scripts to fetch pages from other websites, we suggest you read through the related article on <a title="foobar" href="/php/parse-robots/" target="_parent">setting a user agent and parsing robots.txt</a>.</p> <h2>First checking robots.txt</h2> <p>As mentioned above, before using a script to download files you should always <a target="_blank" href="/php/parse-robots/">check the robots.txt file</a>. Here we're making use of the <tt>robots_allowed</tt> function from the article linked above to determine whether we're allowed to access files:</p> <p>As mentioned above, before using a script to download files you should always <a href="/php/parse-robots/">check the robots.txt file</a>. Here we're making use of the <tt>robots_allowed</tt> function from the article linked above to determine whether we're allowed to access files:</p> HTML; preg_match_all($hrefPattern, $html, $matches, PREG_SET_ORDER ^ PREG_OFFSET_CAPTURE); var_dump($matches);

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.0160.00616.75
8.3.50.0100.00922.03
8.3.40.0160.00618.89
8.3.30.0070.00719.11
8.3.20.0080.00020.16
8.3.10.0030.00523.62
8.3.00.0180.00019.05
8.2.180.0110.01118.43
8.2.170.0140.00722.96
8.2.160.0140.00320.35
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0030.00626.16
8.2.120.0000.00819.12
8.2.110.0040.00422.24
8.2.100.0090.00319.77
8.2.90.0000.00819.02
8.2.80.0000.00817.97
8.2.70.0050.00517.50
8.2.60.0050.00317.91
8.2.50.0030.00618.07
8.2.40.0050.00320.14
8.2.30.0070.00018.25
8.2.20.0000.00817.91
8.2.10.0080.00018.09
8.2.00.0040.00417.84
8.1.280.0060.01225.92
8.1.270.0040.00423.96
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0030.00623.91
8.1.230.0100.00019.16
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0070.00317.48
8.1.190.0060.00317.35
8.1.180.0100.00018.10
8.1.170.0060.00318.57
8.1.160.0040.00421.98
8.1.150.0030.00518.84
8.1.140.0040.00417.56
8.1.130.0040.00417.91
8.1.120.0000.00717.60
8.1.110.0000.00717.56
8.1.100.0000.00717.46
8.1.90.0070.00017.54
8.1.80.0080.00017.59
8.1.70.0080.00017.39
8.1.60.0030.00617.64
8.1.50.0050.00317.45
8.1.40.0080.00017.62
8.1.30.0030.00517.72
8.1.20.0040.00417.75
8.1.10.0030.00517.66
8.1.00.0080.00017.46
8.0.300.0090.00018.77
8.0.290.0000.00817.04
8.0.280.0040.00418.38
8.0.270.0000.00717.27
8.0.260.0030.00317.21
8.0.250.0030.00317.07
8.0.240.0050.00317.04
8.0.230.0030.00317.09
8.0.220.0000.00717.20
8.0.210.0000.00716.91
8.0.200.0030.00317.00
8.0.190.0000.00817.15
8.0.180.0020.00516.96
8.0.170.0040.00416.95
8.0.160.0040.00416.98
8.0.150.0040.00417.03
8.0.140.0060.00316.89
8.0.130.0000.00813.57
8.0.120.0050.00517.02
8.0.110.0000.00717.16
8.0.100.0000.00817.11
8.0.90.0040.00417.23
8.0.80.0110.01117.00
8.0.70.0000.00817.16
8.0.60.0000.00717.09
8.0.50.0000.00817.02
8.0.30.0150.01217.22
8.0.20.0100.01117.41
8.0.10.0000.00817.22
8.0.00.0170.00716.97
7.4.330.0040.00415.00
7.4.320.0000.00716.71
7.4.300.0000.00616.82
7.4.290.0040.00316.58
7.4.280.0000.00816.77
7.4.270.0040.00416.72
7.4.260.0050.00316.80
7.4.250.0000.00816.78
7.4.240.0020.00616.70
7.4.230.0030.00516.78
7.4.220.0160.01216.67
7.4.210.0050.00916.81
7.4.200.0000.00816.71
7.4.190.0000.00716.56
7.4.160.0120.01216.71
7.4.150.0170.00317.40
7.4.140.0120.01117.86
7.4.130.0070.01216.67
7.4.120.0080.01016.62
7.4.110.0180.00716.62
7.4.100.0090.00916.82
7.4.90.0070.01116.66
7.4.80.0000.01819.39
7.4.70.0120.00916.59
7.4.60.0060.01316.58
7.4.50.0000.00816.77
7.4.40.0170.00016.73
7.4.30.0140.00316.60
7.4.00.0100.01014.89
7.3.330.0030.00313.11
7.3.320.0050.00013.34
7.3.310.0000.00716.50
7.3.300.0070.00016.36
7.3.290.0140.00016.36
7.3.280.0090.00816.39
7.3.270.0110.00717.40
7.3.260.0190.00016.44
7.3.250.0080.01416.64
7.3.240.0190.00016.47
7.3.230.0120.00616.50
7.3.210.0190.00016.42
7.3.200.0070.01519.39
7.3.190.0100.00816.82
7.3.180.0040.01316.60
7.3.170.0090.01216.50
7.3.160.0040.01416.46
7.3.120.0070.01014.91
7.2.330.0060.01216.59
7.2.320.0170.00616.52
7.2.310.0090.01316.65
7.2.300.0130.01316.65
7.2.290.0120.01216.46
7.2.00.0070.01019.48
7.1.100.0850.00918.43
7.1.70.0030.00517.00
7.1.60.0070.01719.46
7.1.50.0100.01017.14
7.1.00.0030.08022.33
7.0.200.0040.00416.64
7.0.140.0070.07021.99
7.0.110.0200.07319.88
7.0.100.0170.08019.93
7.0.90.0230.07319.89
7.0.80.0070.05719.84
7.0.70.0100.08319.97
7.0.60.0270.06720.00
7.0.50.0100.08720.14
7.0.40.0130.08320.22
7.0.30.0030.04320.12
7.0.20.0070.05020.20
7.0.10.0100.04319.98
7.0.00.0000.04720.20
5.6.280.0070.07021.12
5.6.250.0000.09020.45
5.6.240.0100.07020.52
5.6.230.0100.07720.65
5.6.220.0070.04020.63
5.6.210.0070.05020.56
5.6.200.0130.08021.14
5.6.190.0100.08721.01
5.6.180.0070.04321.09
5.6.170.0130.05321.23
5.6.160.0030.04321.16
5.6.150.0030.05020.93
5.6.140.0100.06021.08
5.6.130.0030.04720.89
5.6.120.0070.06321.09
5.6.110.0070.04321.08
5.6.100.0030.05020.91
5.6.90.0000.04720.95
5.6.80.0070.03720.28
5.6.70.0100.03320.59
5.6.60.0100.04020.50
5.6.50.0030.07020.47
5.6.40.0030.04020.36
5.6.30.0100.03320.40
5.6.20.0030.04020.38
5.6.10.0070.04320.43
5.6.00.0000.04320.27
5.5.380.0170.07020.52
5.5.370.0030.07320.27
5.5.360.0200.05720.43
5.5.350.0130.07320.43
5.5.340.0130.07320.82
5.5.330.0100.07720.94
5.5.320.0070.05020.76
5.5.310.0070.06720.85
5.5.300.0000.04320.76
5.5.290.0130.04020.81
5.5.280.0000.04720.98
5.5.270.0130.07320.75
5.5.260.0000.04720.78
5.5.250.0100.07320.77
5.5.240.0000.05720.14
5.5.230.0070.05320.20
5.5.220.0070.07020.21
5.5.210.0070.04020.14
5.5.200.0070.04020.27
5.5.190.0030.04020.20
5.5.180.0070.03720.32
5.5.160.0030.05720.17
5.5.150.0030.04020.12
5.5.140.0030.04720.19
5.5.130.0170.06720.28
5.5.120.0000.04320.27
5.5.110.0000.04320.19
5.5.100.0070.04020.23
5.5.90.0070.03720.20
5.5.80.0070.03320.18
5.5.70.0000.04720.18
5.5.60.0030.04020.13
5.5.50.0070.06020.07
5.5.40.0030.08020.20
5.5.30.0070.04020.11
5.5.20.0030.08020.07
5.5.10.0000.07720.08
5.5.00.0170.04719.97
5.4.450.0100.05019.27
5.4.440.0100.03319.50
5.4.430.0070.04019.57
5.4.420.0030.04719.56
5.4.410.0030.04019.27
5.4.400.0000.04018.93
5.4.390.0030.03719.22
5.4.380.0070.04019.03
5.4.370.0070.04019.10
5.4.360.0100.03319.08
5.4.350.0000.04319.09
5.4.340.0030.03719.08
5.4.320.0030.04018.88
5.4.310.0030.03719.07
5.4.300.0030.04019.17
5.4.290.0000.04319.09
5.4.280.0070.04018.92
5.4.270.0070.04019.00
5.4.260.0100.03019.21
5.4.250.0070.03719.09
5.4.240.0100.03319.09
5.4.230.0100.03319.12
5.4.220.0000.04319.02
5.4.210.0000.05718.92
5.4.200.0070.04719.14
5.4.190.0030.08019.07
5.4.180.0000.08719.23
5.4.170.0100.07018.91
5.4.160.0030.05718.93
5.4.150.0130.07319.06
5.4.140.0200.06316.29
5.4.130.0070.07016.14
5.4.120.0030.07716.37
5.4.110.0030.07316.50
5.4.100.0170.03316.21
5.4.90.0130.07016.35
5.4.80.0030.07316.36
5.4.70.0170.06016.56
5.4.60.0030.04716.36
5.4.50.0100.07316.41
5.4.40.0100.07316.37
5.4.30.0100.07016.34
5.4.20.0130.06016.25
5.4.10.0130.06316.23
5.4.00.0130.06015.79
5.3.290.0070.04014.55
5.3.280.0000.04714.48
5.3.270.0100.07314.61
5.3.260.0130.05314.47
5.3.250.0030.07714.41
5.3.240.0000.08314.71
5.3.230.0030.05014.54
5.3.220.0070.04714.47
5.3.210.0200.06014.50
5.3.200.0100.07314.40
5.3.190.0130.03714.45
5.3.180.0070.07014.45
5.3.170.0100.07314.47
5.3.160.0270.03014.48
5.3.150.0070.06014.61
5.3.140.0130.06714.35
5.3.130.0070.08314.45
5.3.120.0030.04714.48
5.3.110.0030.07714.43
5.3.100.0100.06313.89
5.3.90.0070.07713.96
5.3.80.0070.05013.85
5.3.70.0100.06713.93
5.3.60.0070.06714.10
5.3.50.0070.06713.87
5.3.40.0170.07013.84
5.3.30.0200.04013.79
5.3.20.0070.06713.71
5.3.10.0070.06713.51
5.3.00.0130.06313.70
5.2.170.0070.07011.05
5.2.160.0030.06311.31
5.2.150.0000.04711.05
5.2.140.0100.06011.10
5.2.130.0070.03311.12
5.2.120.0070.03311.03
5.2.110.0070.06011.03
5.2.100.0000.04711.10
5.2.90.0030.05311.03
5.2.80.0030.06711.12
5.2.70.0030.03011.26
5.2.60.0100.06010.96
5.2.50.0070.06011.10
5.2.40.0030.05311.07
5.2.30.0100.06011.00
5.2.20.0070.06011.10
5.2.10.0030.04710.82
5.2.00.0030.02710.67
5.1.60.0030.0579.99
5.1.50.0030.02710.00
5.1.40.0070.04710.00
5.1.30.0030.05710.33
5.1.20.0030.04010.43
5.1.10.0070.05310.05
5.1.00.0000.05010.06
5.0.50.0100.0408.95
5.0.40.0070.0438.95
5.0.30.0030.0638.95
5.0.20.0030.0478.95
5.0.10.0000.0278.95
5.0.00.0030.0708.95
4.4.90.0030.0338.95
4.4.80.0030.0378.95
4.4.70.0000.0378.95
4.4.60.0000.0408.95
4.4.50.0070.0338.95
4.4.40.0000.0278.95
4.4.30.0000.0378.95
4.4.20.0070.0338.95
4.4.10.0000.0378.95
4.4.00.0030.0538.95
4.3.110.0000.0238.95
4.3.100.0070.0308.95
4.3.90.0100.0208.95
4.3.80.0000.0478.95
4.3.70.0000.0378.95
4.3.60.0030.0338.95
4.3.50.0030.0338.95
4.3.40.0030.0508.95
4.3.30.0000.0338.95
4.3.20.0030.0338.95
4.3.10.0100.0278.95
4.3.00.0000.0238.95

preferences:
44.98 ms | 401 KiB | 5 Q