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 ^ 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.40.0060.00918.95
8.3.30.0080.01118.92
8.3.20.0030.00520.34
8.3.10.0040.00423.66
8.3.00.0040.00421.00
8.2.170.0110.00422.96
8.2.160.0110.00420.43
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0000.00820.85
8.2.110.0060.00321.21
8.2.100.0080.00417.97
8.2.90.0080.00018.03
8.2.80.0050.00318.03
8.2.70.0030.00517.75
8.2.60.0030.00617.92
8.2.50.0050.00318.07
8.2.40.0060.00319.79
8.2.30.0000.00718.15
8.2.20.0000.00817.73
8.2.10.0040.00418.07
8.2.00.0040.00417.89
8.1.270.0050.00323.88
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0090.00023.98
8.1.230.0000.01221.04
8.1.220.0000.00817.76
8.1.210.0030.00518.77
8.1.200.0040.00417.38
8.1.190.0000.00917.23
8.1.180.0000.00819.13
8.1.170.0030.00718.64
8.1.160.0080.00021.86
8.1.150.0000.00718.84
8.1.140.0050.00317.66
8.1.130.0030.00517.91
8.1.120.0040.00417.61
8.1.110.0040.00417.58
8.1.100.0040.00417.48
8.1.90.0020.00517.53
8.1.80.0040.00317.54
8.1.70.0030.00317.56
8.1.60.0030.00517.70
8.1.50.0040.00417.48
8.1.40.0000.00917.62
8.1.30.0050.00317.77
8.1.20.0050.00317.69
8.1.10.0030.00517.66
8.1.00.0030.00617.50
8.0.300.0070.00019.90
8.0.290.0030.00516.75
8.0.280.0000.00818.41
8.0.270.0070.00017.24
8.0.260.0000.00617.14
8.0.250.0000.00716.99
8.0.240.0030.00717.00
8.0.230.0040.00416.95
8.0.220.0000.00717.03
8.0.210.0000.00717.04
8.0.200.0000.00717.01
8.0.190.0040.00417.03
8.0.180.0000.00717.05
8.0.170.0040.00416.97
8.0.160.0090.00017.10
8.0.150.0040.00417.06
8.0.140.0000.00716.98
8.0.130.0030.00613.44
8.0.120.0040.00416.98
8.0.110.0040.00416.99
8.0.100.0000.00817.13
8.0.90.0030.00517.14
8.0.80.0090.01216.99
8.0.70.0000.00817.16
8.0.60.0070.00016.98
8.0.50.0000.00717.10
8.0.30.0150.00617.28
8.0.20.0110.00917.40
8.0.10.0000.00717.09
8.0.00.0090.01216.96
7.4.330.0030.00315.07
7.4.320.0040.00416.63
7.4.300.0060.00016.70
7.4.290.0000.00716.84
7.4.280.0030.00516.86
7.4.270.0000.00716.71
7.4.260.0020.00516.80
7.4.250.0040.00416.61
7.4.240.0030.00316.78
7.4.230.0040.00416.76
7.4.220.0140.00716.91
7.4.210.0070.00816.77
7.4.200.0000.00716.55
7.4.190.0000.00816.80
7.4.160.0090.00916.64
7.4.150.0050.01517.40
7.4.140.0090.01217.86
7.4.130.0170.00416.75
7.4.120.0100.00816.66
7.4.110.0030.01516.68
7.4.100.0060.01616.56
7.4.90.0100.01016.75
7.4.80.0130.00919.39
7.4.70.0180.00016.78
7.4.60.0060.01216.66
7.4.50.0060.00316.61
7.4.40.0120.00616.46
7.4.30.0090.00916.77
7.4.00.0070.01015.14
7.3.330.0000.00513.11
7.3.320.0050.00013.10
7.3.310.0030.00516.32
7.3.300.0030.00316.32
7.3.290.0030.01316.40
7.3.280.0080.00916.38
7.3.270.0060.01317.40
7.3.260.0160.00316.73
7.3.250.0170.00316.41
7.3.240.0120.01216.36
7.3.230.0070.01116.59
7.3.210.0110.00616.38
7.3.200.0030.02019.39
7.3.190.0090.00916.62
7.3.180.0000.01816.44
7.3.170.0070.01016.54
7.3.160.0140.00316.52
7.3.120.0030.01314.61
7.3.10.0130.00016.87
7.3.00.0000.01116.90
7.2.330.0070.01316.57
7.2.320.0110.00716.73
7.2.310.0180.00716.76
7.2.300.0060.01216.54
7.2.290.0120.00916.76
7.2.130.0040.01416.88
7.2.120.0090.00316.65
7.2.110.0040.00716.77
7.2.100.0070.00416.55
7.2.90.0100.00316.93
7.2.80.0110.00316.77
7.2.70.0030.00616.98
7.2.60.0080.00516.82
7.2.50.0000.01616.78
7.2.40.0040.00716.92
7.2.30.0060.00616.91
7.2.20.0120.00416.84
7.2.10.0000.01016.97
7.2.00.0070.00818.04
7.1.250.0030.01016.04
7.1.100.0060.00918.27
7.1.70.0000.00717.17
7.1.60.0090.01619.46
7.1.50.0100.01017.14
7.1.00.0070.07022.56
7.0.200.0000.00716.80
7.0.140.0070.07321.96
7.0.70.0000.04321.69
7.0.60.0100.07321.73
7.0.50.0070.05721.96
7.0.40.0070.07320.10
7.0.30.0030.08720.13
7.0.20.0070.07320.17
7.0.10.0030.08320.13
7.0.00.0130.07720.04
5.6.280.0030.07320.77
5.6.220.0070.04020.58
5.6.210.0030.08320.49
5.6.200.0170.05721.13
5.6.190.0100.06321.04
5.6.180.0030.08321.03
5.6.170.0070.07321.04
5.6.160.0100.07721.06
5.6.150.0100.08321.07
5.6.140.0030.08321.03
5.6.130.0170.07320.94
5.6.120.0000.07721.13
5.6.110.0070.08021.00
5.6.100.0030.05321.00
5.6.90.0030.07021.03
5.6.80.0130.05320.40
5.6.70.0100.05320.48
5.6.60.0000.07720.42
5.6.50.0070.06020.31
5.6.40.0070.07020.46
5.6.30.0030.06720.30
5.6.20.0070.07320.34
5.6.10.0030.08320.32
5.6.00.0070.07320.28
5.5.360.0070.05720.28
5.5.350.0130.05720.39
5.5.340.0030.08720.73
5.5.330.0070.07720.91
5.5.320.0000.08720.88
5.5.310.0000.08320.86
5.5.300.0100.07320.86
5.5.290.0070.07020.79
5.5.280.0030.07320.80
5.5.270.0100.07020.72
5.5.260.0070.08020.72
5.5.250.0070.05720.61
5.5.240.0070.07320.25
5.5.230.0070.07020.26
5.5.220.0070.06020.20
5.5.210.0000.08320.29
5.5.200.0030.06720.14
5.5.190.0130.07720.27
5.5.180.0030.06020.20
5.5.160.0070.07719.99
5.5.150.0000.05320.18
5.5.140.0000.08720.21
5.5.130.0130.05320.27
5.5.120.0070.06020.14
5.5.110.0030.07720.15
5.5.100.0070.07720.00
5.5.90.0030.04020.01
5.5.80.0070.06719.95
5.5.70.0000.04320.14
5.5.60.0030.07020.06
5.5.50.0030.04020.06
5.5.40.0070.04319.95
5.5.30.0030.07719.92
5.5.20.0070.08020.10
5.5.10.0070.06320.11
5.5.00.0100.07019.99
5.4.450.0000.04719.47
5.4.440.0030.07019.11
5.4.430.0000.06319.35
5.4.420.0070.06319.42
5.4.410.0130.07319.29
5.4.400.0000.05319.23
5.4.390.0030.05019.03
5.4.380.0030.07319.12
5.4.370.0030.07718.78
5.4.360.0000.08018.91
5.4.350.0100.06718.97
5.4.340.0000.07319.23
5.4.320.0030.08019.13
5.4.310.0100.05719.12
5.4.300.0070.07318.90
5.4.290.0000.06719.07
5.4.280.0000.08018.97
5.4.270.0000.07319.04
5.4.260.0070.07319.09
5.4.250.0030.03718.84
5.4.240.0030.04318.93
5.4.230.0000.07019.22
5.4.220.0070.07018.89
5.4.210.0000.07319.22
5.4.200.0030.05719.05
5.4.190.0100.03719.11
5.4.180.0070.07019.09
5.4.170.0100.07018.80
5.4.160.0030.06318.79
5.4.150.0000.05018.76
5.4.140.0030.04316.31
5.4.130.0100.06716.22
5.4.120.0030.04716.31
5.4.110.0100.05316.32
5.4.100.0030.07716.35
5.4.90.0030.04316.45
5.4.80.0030.05016.30
5.4.70.0070.07016.33
5.4.60.0030.05716.34
5.4.50.0070.05716.21
5.4.40.0100.03316.24
5.4.30.0030.04016.27
5.4.20.0000.07016.38
5.4.10.0070.06316.17
5.4.00.0100.06315.67
5.3.290.0100.07314.66
5.3.280.0000.06014.59
5.3.270.0030.05314.45
5.3.260.0000.05314.62
5.3.250.0030.07014.47
5.3.240.0070.07014.57
5.3.230.0030.04014.46
5.3.220.0100.06714.43
5.3.210.0000.06314.45
5.3.200.0070.07314.43
5.3.190.0100.06014.55
5.3.180.0030.07714.56
5.3.170.0070.06314.39
5.3.160.0100.03014.52
5.3.150.0070.04714.48
5.3.140.0070.04714.55
5.3.130.0000.06014.41
5.3.120.0000.06314.56
5.3.110.0070.07714.41
5.3.100.0030.08013.89
5.3.90.0030.07014.02
5.3.80.0070.07313.96
5.3.70.0070.07013.88
5.3.60.0000.07314.00
5.3.50.0000.07313.72
5.3.40.0030.07713.71
5.3.30.0030.07013.90
5.3.20.0070.06313.45
5.3.10.0030.07313.65
5.3.00.0030.07013.59
5.2.170.0030.05711.17
5.2.160.0000.06311.14
5.2.150.0000.06311.11
5.2.140.0000.05010.97
5.2.130.0000.06310.96
5.2.120.0030.04011.18
5.2.110.0030.04710.89
5.2.100.0000.04311.09
5.2.90.0070.05711.11
5.2.80.0070.06010.94
5.2.70.0030.06010.92
5.2.60.0070.05711.05
5.2.50.0000.05710.82
5.2.40.0030.06010.86
5.2.30.0030.06011.05
5.2.20.0030.05011.10
5.2.10.0070.05010.96
5.2.00.0000.05710.82
5.1.60.0000.04010.81
5.1.50.0030.04010.81
5.1.40.0000.02710.81
5.1.30.0070.05710.81
5.1.20.0070.03010.81
5.1.10.0000.03710.81
5.1.00.0070.05310.81
5.0.50.0030.03010.81
5.0.40.0030.04310.81
5.0.30.0000.06310.81
5.0.20.0100.03310.81
5.0.10.0070.03710.81
5.0.00.0030.06710.81
4.4.90.0000.03310.81
4.4.80.0000.03710.81
4.4.70.0000.03010.81
4.4.60.0000.03010.81
4.4.50.0030.02710.81
4.4.40.0000.05010.81
4.4.30.0000.01710.81
4.4.20.0030.02310.81
4.4.10.0070.01710.81
4.4.00.0030.05310.81
4.3.110.0000.03310.81
4.3.100.0000.04010.81
4.3.90.0070.03010.81
4.3.80.0030.04010.81
4.3.70.0000.04010.81
4.3.60.0000.03710.81
4.3.50.0030.02710.81
4.3.40.0000.05710.81
4.3.30.0070.03010.81
4.3.20.0070.03710.81
4.3.10.0070.03310.81
4.3.00.0000.03310.81

preferences:
43.94 ms | 400 KiB | 5 Q