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 href="/php/parse-robots/" title="foobar" 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); 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.0120.00618.61
8.3.50.0130.00722.08
8.3.40.0070.00718.83
8.3.30.0160.00319.09
8.3.20.0040.00420.29
8.3.10.0050.00323.61
8.3.00.0080.00019.08
8.2.180.0090.00618.30
8.2.170.0090.00622.96
8.2.160.0030.01020.43
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0070.00326.16
8.2.120.0040.00420.98
8.2.110.0030.00620.22
8.2.100.0110.00017.91
8.2.90.0050.00318.30
8.2.80.0050.00317.97
8.2.70.0030.00517.88
8.2.60.0030.00517.80
8.2.50.0000.00818.07
8.2.40.0030.00520.00
8.2.30.0040.00418.32
8.2.20.0040.00419.69
8.2.10.0000.00817.99
8.2.00.0060.00317.84
8.1.280.0140.00425.92
8.1.270.0090.00023.95
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0000.00822.05
8.1.230.0000.01120.97
8.1.220.0000.00817.75
8.1.210.0030.00518.86
8.1.200.0080.00317.48
8.1.190.0050.00317.35
8.1.180.0030.00519.26
8.1.170.0040.00418.69
8.1.160.0000.00721.90
8.1.150.0040.00418.80
8.1.140.0000.00717.63
8.1.130.0030.00317.84
8.1.120.0000.00717.47
8.1.110.0000.00717.57
8.1.100.0000.00717.53
8.1.90.0050.00317.54
8.1.80.0050.00317.50
8.1.70.0030.00317.46
8.1.60.0030.00617.66
8.1.50.0050.00317.62
8.1.40.0000.00717.66
8.1.30.0060.00317.71
8.1.20.0000.00717.70
8.1.10.0000.00817.58
8.1.00.0000.00817.59
8.0.300.0030.00420.08
8.0.290.0000.00716.93
8.0.280.0030.00318.40
8.0.270.0040.00417.17
8.0.260.0060.00017.22
8.0.250.0040.00317.05
8.0.240.0040.00716.95
8.0.230.0040.00417.12
8.0.220.0000.00717.16
8.0.210.0070.00017.05
8.0.200.0070.00016.98
8.0.190.0050.00317.00
8.0.180.0040.00417.07
8.0.170.0040.00417.07
8.0.160.0040.00417.08
8.0.150.0000.00817.06
8.0.140.0040.00417.03
8.0.130.0070.00213.50
8.0.120.0040.00417.04
8.0.110.0040.00417.03
8.0.100.0080.00317.02
8.0.90.0020.00516.97
8.0.80.0060.00917.10
8.0.70.0030.00517.07
8.0.60.0040.00417.20
8.0.50.0000.00716.93
8.0.30.0120.01017.39
8.0.20.0140.00717.40
8.0.10.0040.00417.29
8.0.00.0140.00816.78
7.4.330.0000.00615.05
7.4.320.0000.00616.79
7.4.300.0070.00016.71
7.4.290.0050.00216.83
7.4.280.0000.00816.81
7.4.270.0030.00316.77
7.4.260.0080.00016.79
7.4.250.0000.00716.84
7.4.240.0030.00316.81
7.4.230.0040.00416.64
7.4.220.0030.01616.89
7.4.210.0090.00616.87
7.4.200.0040.00416.89
7.4.190.0040.00416.85
7.4.160.0080.00816.65
7.4.150.0130.00617.40
7.4.140.0130.00917.86
7.4.130.0100.00816.68
7.4.120.0080.01116.73
7.4.110.0080.00816.62
7.4.100.0090.01216.70
7.4.90.0090.00916.66
7.4.80.0110.01419.39
7.4.70.0090.00916.66
7.4.60.0120.00616.52
7.4.50.0060.00316.61
7.4.40.0090.00916.55
7.4.30.0030.01416.66
7.4.00.0000.01815.09
7.3.330.0000.00513.26
7.3.320.0030.00313.27
7.3.310.0000.00816.42
7.3.300.0040.00416.39
7.3.290.0090.00616.34
7.3.280.0090.00916.34
7.3.270.0100.00717.40
7.3.260.0150.00316.61
7.3.250.0160.00516.52
7.3.240.0090.01316.59
7.3.230.0150.00916.39
7.3.210.0140.00516.32
7.3.200.0150.00919.39
7.3.190.0190.00416.60
7.3.180.0090.01216.54
7.3.170.0130.01016.48
7.3.160.0100.00716.48
7.3.120.0030.01215.13
7.3.10.0060.00916.64
7.3.00.0070.00316.85
7.2.330.0090.00916.63
7.2.320.0070.01116.50
7.2.310.0030.01616.62
7.2.300.0040.01416.61
7.2.290.0100.00716.53
7.2.130.0100.00616.95
7.2.120.0070.00716.88
7.2.110.0070.00717.02
7.2.100.0070.01016.93
7.2.90.0000.01016.93
7.2.80.0090.00616.99
7.2.70.0070.00716.76
7.2.60.0000.01017.04
7.2.50.0040.01516.98
7.2.40.0070.00716.90
7.2.30.0030.00816.97
7.2.20.0070.00716.66
7.2.10.0070.00716.86
7.2.00.0050.01018.28
7.1.250.0080.00615.90
7.1.100.0000.01117.86
7.1.70.0060.00917.01
7.1.60.0110.01119.46
7.1.50.0100.01016.93
7.1.00.0030.07722.46
7.0.200.0100.00016.86
7.0.140.0000.07721.95
7.0.100.0130.07719.91
7.0.90.0130.07720.04
7.0.80.0130.07320.03
7.0.70.0030.08020.15
7.0.60.0000.08319.86
7.0.50.0030.04720.33
7.0.40.0170.07720.05
7.0.30.0070.08320.06
7.0.20.0100.04720.14
7.0.10.0030.06320.00
7.0.00.0000.05720.10
5.6.280.0030.07320.86
5.6.250.0030.08020.72
5.6.240.0070.07320.69
5.6.230.0070.07320.75
5.6.220.0070.08320.49
5.6.210.0100.08020.61
5.6.200.0070.10721.09
5.6.190.0130.08020.96
5.6.180.0070.07321.08
5.6.170.0100.08021.11
5.6.160.0070.08721.08
5.6.150.0100.07021.06
5.6.140.0130.07320.99
5.6.130.0070.09020.94
5.6.120.0130.07321.07
5.6.110.0070.08721.00
5.6.100.0130.09720.88
5.6.90.0100.07720.90
5.6.80.0100.07320.42
5.6.70.0100.07320.43
5.6.60.0070.07320.38
5.6.50.0170.06720.43
5.6.40.0170.07320.46
5.6.30.0000.09020.37
5.6.20.0000.06320.43
5.6.10.0030.08320.30
5.6.00.0130.04720.41
5.5.380.0070.07720.42
5.5.370.0130.07020.55
5.5.360.0170.07720.36
5.5.350.0070.06720.47
5.5.340.0030.07720.87
5.5.330.0070.08020.80
5.5.320.0130.07720.93
5.5.310.0070.08020.76
5.5.300.0100.07020.93
5.5.290.0170.06320.80
5.5.280.0030.08020.88
5.5.270.0170.07020.88
5.5.260.0070.08720.91
5.5.250.0070.08320.62
5.5.240.0070.08020.17
5.5.230.0100.07320.11
5.5.220.0070.07720.18
5.5.210.0070.07320.18
5.5.200.0170.07020.22
5.5.190.0030.05320.19
5.5.180.0070.07720.20
5.5.160.0130.05720.11
5.5.150.0170.07320.18
5.5.140.0070.07720.15
5.5.130.0130.04320.11
5.5.120.0030.08019.98
5.5.110.0030.08720.24
5.5.100.0000.08320.16
5.5.90.0070.08020.17
5.5.80.0170.08019.95
5.5.70.0030.08720.00
5.5.60.0070.06320.14
5.5.50.0000.04320.15
5.5.40.0000.04020.13
5.5.30.0030.04720.14
5.5.20.0100.03320.11
5.5.10.0070.04320.13
5.5.00.0070.04720.04
5.4.450.0070.07719.40
5.4.440.0170.07019.42
5.4.430.0170.07019.36
5.4.420.0030.05319.30
5.4.410.0100.04719.18
5.4.400.0100.07019.07
5.4.390.0070.08018.96
5.4.380.0130.02718.78
5.4.370.0030.07718.96
5.4.360.0000.05319.13
5.4.350.0130.06719.03
5.4.340.0130.04019.10
5.4.320.0000.08019.24
5.4.310.0070.07719.15
5.4.300.0070.07719.09
5.4.290.0030.08019.22
5.4.280.0100.07319.09
5.4.270.0100.07719.12
5.4.260.0170.06719.10
5.4.250.0070.07719.07
5.4.240.0200.06018.78
5.4.230.0030.04019.06
5.4.220.0070.05719.01
5.4.210.0000.04019.04
5.4.200.0100.03318.84
5.4.190.0100.06018.93
5.4.180.0100.03018.80
5.4.170.0070.04719.05
5.4.160.0070.03319.13
5.4.150.0030.04018.97
5.4.140.0000.04016.33
5.4.130.0000.03716.36
5.4.120.0030.04316.12
5.4.110.0070.07016.26
5.4.100.0030.03716.34
5.4.90.0070.03016.45
5.4.80.0000.05316.39
5.4.70.0100.04316.33
5.4.60.0000.03716.29
5.4.50.0070.03316.18
5.4.40.0000.04016.29
5.4.30.0000.04016.41
5.4.20.0070.03316.41
5.4.10.0000.06316.33
5.4.00.0000.07015.82
5.3.290.0100.08014.62
5.3.280.0100.04714.57
5.3.270.0100.04314.61
5.3.260.0070.03314.46
5.3.250.0000.04314.60
5.3.240.0100.07014.55
5.3.230.0070.04714.59
5.3.220.0030.04014.48
5.3.210.0070.03314.48
5.3.200.0030.03714.57
5.3.190.0100.03014.53
5.3.180.0000.04014.57
5.3.170.0000.04714.50
5.3.160.0070.07014.42
5.3.150.0100.04314.57
5.3.140.0100.05014.40
5.3.130.0070.03314.50
5.3.120.0100.04714.55
5.3.110.0000.04014.37
5.3.100.0030.06713.90
5.3.90.0030.07313.87
5.3.80.0070.05014.00
5.3.70.0030.03714.02
5.3.60.0030.05713.99
5.3.50.0000.04713.89
5.3.40.0070.03713.70
5.3.30.0030.03313.87
5.3.20.0070.03313.60
5.3.10.0000.03713.59
5.3.00.0070.03713.51
5.2.170.0030.04010.99
5.2.160.0070.02711.16
5.2.150.0000.03311.10
5.2.140.0070.02311.20
5.2.130.0000.03011.15
5.2.120.0000.04310.92
5.2.110.0070.02311.12
5.2.100.0030.05711.17
5.2.90.0030.05010.89
5.2.80.0000.03011.04
5.2.70.0000.03011.11
5.2.60.0030.02710.90
5.2.50.0030.04711.09
5.2.40.0000.03011.04
5.2.30.0000.03010.84
5.2.20.0070.03711.09
5.2.10.0030.02710.87
5.2.00.0070.02710.82
5.1.60.0000.02710.13
5.1.50.0030.04710.05
5.1.40.0000.02710.12
5.1.30.0030.02310.46
5.1.20.0030.02710.50
5.1.10.0000.05010.00
5.1.00.0030.03710.15
5.0.50.0000.0238.70
5.0.40.0070.0408.43
5.0.30.0000.0408.43
5.0.20.0070.0408.43
5.0.10.0030.0238.43
5.0.00.0030.0578.43
4.4.90.0000.0178.43
4.4.80.0030.0138.43
4.4.70.0000.0178.43
4.4.60.0000.0178.43
4.4.50.0000.0178.43
4.4.40.0030.0238.43
4.4.30.0000.0178.43
4.4.20.0030.0138.43
4.4.10.0030.0338.43
4.4.00.0070.0478.43
4.3.110.0070.0278.43
4.3.100.0000.0278.43
4.3.90.0070.0308.43
4.3.80.0030.0278.43
4.3.70.0030.0278.43
4.3.60.0030.0208.43
4.3.50.0030.0338.43
4.3.40.0070.0478.43
4.3.30.0030.0338.43
4.3.20.0100.0308.43
4.3.10.0000.0378.43
4.3.00.0000.0308.43

preferences:
44.36 ms | 401 KiB | 5 Q