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.60.0080.00816.88
8.3.50.0160.00522.10
8.3.40.0120.00319.11
8.3.30.0040.01119.09
8.3.20.0040.00420.18
8.3.10.0000.00823.64
8.3.00.0080.00019.22
8.2.180.0090.01218.43
8.2.170.0100.00322.96
8.2.160.0140.00420.22
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0080.00021.09
8.2.110.0060.00322.43
8.2.100.0090.00317.91
8.2.90.0040.00419.05
8.2.80.0000.00817.97
8.2.70.0030.00617.63
8.2.60.0090.00017.90
8.2.50.0030.00618.07
8.2.40.0000.00820.20
8.2.30.0000.00918.23
8.2.20.0030.00617.89
8.2.10.0050.00217.97
8.2.00.0040.00417.75
8.1.280.0100.00725.92
8.1.270.0060.00323.79
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0070.00323.81
8.1.230.0080.00419.01
8.1.220.0080.00017.74
8.1.210.0000.00918.77
8.1.200.0090.00017.48
8.1.190.0000.00817.35
8.1.180.0050.00518.10
8.1.170.0060.00318.63
8.1.160.0050.00222.00
8.1.150.0040.00418.74
8.1.140.0030.00717.66
8.1.130.0000.00717.91
8.1.120.0070.00017.42
8.1.110.0080.00017.52
8.1.100.0000.00717.45
8.1.90.0000.00717.44
8.1.80.0050.00317.54
8.1.70.0000.00717.48
8.1.60.0030.00517.64
8.1.50.0040.00417.58
8.1.40.0000.00717.50
8.1.30.0040.00417.75
8.1.20.0040.00417.66
8.1.10.0000.00817.63
8.1.00.0000.00817.65
8.0.300.0040.00418.77
8.0.290.0000.00717.05
8.0.280.0030.00318.43
8.0.270.0070.00017.27
8.0.260.0030.00317.27
8.0.250.0070.00017.09
8.0.240.0040.00417.15
8.0.230.0000.00717.14
8.0.220.0000.00717.07
8.0.210.0070.00016.99
8.0.200.0000.00717.05
8.0.190.0060.00317.14
8.0.180.0040.00417.05
8.0.170.0000.00817.00
8.0.160.0080.00016.92
8.0.150.0050.00317.07
8.0.140.0000.00817.03
8.0.130.0030.00313.42
8.0.120.0040.00417.04
8.0.110.0000.00717.09
8.0.100.0080.00016.93
8.0.90.0080.00017.13
8.0.80.0030.01317.15
8.0.70.0090.00017.00
8.0.60.0040.00417.09
8.0.50.0030.00517.15
8.0.30.0080.01217.27
8.0.20.0090.00917.40
8.0.10.0030.00517.03
8.0.00.0050.01216.82
7.4.330.0050.00015.00
7.4.320.0000.00616.83
7.4.300.0030.00316.79
7.4.290.0070.00016.70
7.4.280.0050.00216.73
7.4.270.0080.00016.62
7.4.260.0030.00316.61
7.4.250.0020.00516.64
7.4.240.0030.00516.83
7.4.230.0080.00016.83
7.4.220.0120.01416.68
7.4.210.0050.00916.76
7.4.200.0040.00416.68
7.4.190.0020.00516.80
7.4.160.0060.01516.85
7.4.150.0130.00317.40
7.4.140.0100.00717.86
7.4.130.0070.01016.60
7.4.120.0090.00816.74
7.4.110.0100.00716.68
7.4.100.0130.00616.77
7.4.90.0080.00816.59
7.4.80.0170.00619.39
7.4.70.0060.01016.61
7.4.60.0100.00716.57
7.4.50.0000.00716.65
7.4.40.0000.01616.54
7.4.30.0030.01916.68
7.4.10.0120.00614.88
7.4.00.0090.00614.94
7.3.330.0060.00013.32
7.3.320.0000.00513.04
7.3.310.0070.00016.22
7.3.300.0030.00316.23
7.3.290.0030.01716.40
7.3.280.0080.00916.34
7.3.270.0070.01117.40
7.3.260.0060.01816.30
7.3.250.0110.00616.46
7.3.240.0130.00416.66
7.3.230.0200.00316.44
7.3.210.0130.00316.43
7.3.200.0180.00319.39
7.3.190.0030.01416.57
7.3.180.0070.01016.43
7.3.170.0100.01016.54
7.3.160.0150.00616.63
7.3.130.0100.01015.14
7.3.120.0050.01214.96
7.3.110.0130.00614.84
7.3.100.0040.00914.91
7.3.90.0030.01214.89
7.3.80.0060.00915.05
7.3.70.0050.00514.83
7.3.60.0090.00314.97
7.3.50.0080.00414.85
7.3.40.0040.00714.73
7.3.30.0000.01015.02
7.3.20.0030.00616.57
7.3.10.0030.00916.50
7.3.00.0070.00716.88
7.2.330.0070.01116.55
7.2.320.0000.02016.57
7.2.310.0090.01516.64
7.2.300.0090.01116.67
7.2.290.0120.00616.54
7.2.260.0150.00415.01
7.2.250.0060.01214.77
7.2.240.0000.01315.26
7.2.230.0070.01014.86
7.2.220.0030.01314.88
7.2.210.0070.00714.97
7.2.200.0000.01215.19
7.2.190.0000.01114.90
7.2.180.0070.00714.80
7.2.170.0030.00915.06
7.2.160.0090.00614.94
7.2.150.0060.00616.68
7.2.140.0030.01016.95
7.2.130.0100.00016.63
7.2.120.0040.00716.78
7.2.110.0070.00717.01
7.2.100.0040.00917.06
7.2.90.0030.01316.92
7.2.80.0090.00616.82
7.2.70.0130.00316.96
7.2.60.0090.00616.97
7.2.50.0060.00916.94
7.2.40.0090.00616.91
7.2.30.0060.00616.88
7.2.20.0030.01217.01
7.2.10.0090.00616.95
7.2.00.0060.00616.88
7.1.330.0030.01016.16
7.1.320.0040.00815.74
7.1.310.0100.00616.10
7.1.300.0060.00615.64
7.1.290.0000.00815.90
7.1.280.0060.01015.83
7.1.270.0030.01015.86
7.1.260.0070.00315.70
7.1.250.0030.01015.88
7.1.240.0000.00815.72
7.1.230.0090.00315.54
7.1.220.0070.00715.74
7.1.210.0060.00916.05
7.1.200.0040.01115.91
7.1.190.0090.00615.79
7.1.180.0070.00716.02
7.1.170.0100.00315.68
7.1.160.0090.00615.90
7.1.150.0040.01215.66
7.1.140.0060.00615.89
7.1.130.0000.01516.03
7.1.120.0040.00415.88
7.1.110.0090.00915.89
7.1.100.0100.00316.01
7.1.90.0120.00315.98
7.1.80.0100.00315.59
7.1.70.0070.00716.69
7.1.60.0120.00817.58
7.1.50.0060.00816.58
7.1.40.0060.00615.71
7.1.30.0110.00015.95
7.1.20.0110.00315.85
7.1.10.0000.01315.75
7.1.00.0030.04419.26
7.0.330.0000.00815.56
7.0.320.0000.01515.63
7.0.310.0120.00315.14
7.0.300.0030.01015.77
7.0.290.0000.00915.70
7.0.280.0030.00915.23
7.0.270.0070.00715.27
7.0.260.0030.01015.25
7.0.250.0100.00315.60
7.0.240.0030.01015.66
7.0.230.0030.00615.74
7.0.220.0030.01315.79
7.0.210.0040.00415.58
7.0.200.0070.00415.94
7.0.190.0150.00015.48
7.0.180.0030.00915.75
7.0.170.0060.00315.69
7.0.160.0080.00615.16
7.0.150.0090.00015.28
7.0.140.0050.03918.86
7.0.130.0000.01015.66
7.0.120.0030.01015.44
7.0.110.0070.00715.59
7.0.100.0040.01115.40
7.0.90.0040.01115.23
7.0.80.0030.00715.40
7.0.70.0080.00415.36
7.0.60.0050.02917.76
7.0.50.0040.03216.78
7.0.40.0080.04516.85
7.0.30.0170.03816.92
7.0.20.0180.04616.95
7.0.10.0020.05116.94
7.0.00.0120.04216.95
5.6.400.0060.00314.66
5.6.390.0000.00814.11
5.6.380.0030.01014.48
5.6.370.0070.00414.56
5.6.360.0070.00714.46
5.6.350.0030.00614.63
5.6.340.0100.00714.60
5.6.330.0060.00914.50
5.6.320.0070.01114.00
5.6.310.0030.01014.13
5.6.300.0040.01114.04
5.6.290.0130.00713.96
5.6.280.0040.04017.64
5.6.270.0070.00714.54
5.6.260.0000.01314.15
5.6.250.0040.00814.18
5.6.240.0030.01014.22
5.6.230.0060.00314.17
5.6.220.0060.01114.34
5.6.210.0070.03817.41
5.6.200.0110.03816.35
5.6.190.0030.02517.37
5.6.180.0050.04117.56
5.6.170.0070.05117.47
5.6.160.0070.02317.55
5.6.150.0080.04016.24
5.6.140.0070.04316.28
5.6.130.0090.03716.22
5.6.120.0050.03517.73
5.6.110.0080.03617.59
5.6.100.0050.04817.59
5.6.90.0040.04517.69
5.6.80.0020.04217.46
5.6.70.0060.01014.11
5.6.60.0090.00614.16
5.6.50.0120.00314.37
5.6.40.0060.00614.30
5.6.30.0040.01114.38
5.6.20.0030.00614.23
5.6.10.0070.00714.13
5.6.00.0030.00514.01
5.5.380.0100.00314.34
5.5.370.0050.00314.20
5.5.360.0080.00814.45
5.5.350.0000.05217.28
5.5.340.0090.04216.02
5.5.330.0080.02917.17
5.5.320.0250.03617.40
5.5.310.0120.04517.21
5.5.300.0050.02916.19
5.5.290.0020.04915.92
5.5.280.0030.03217.61
5.5.270.0060.03717.58
5.5.260.0050.04917.47
5.5.250.0050.03017.49
5.5.240.0050.04317.06
5.5.230.0000.01013.93
5.5.220.0080.00314.09
5.5.210.0110.00314.24
5.5.200.0030.01014.14
5.5.190.0030.00614.24
5.5.180.0090.00914.13
5.5.170.0070.00713.98
5.5.160.0030.00914.23
5.5.150.0030.00714.23
5.5.140.0000.01013.82
5.5.130.0040.01114.14
5.5.120.0090.00614.14
5.5.110.0000.00814.13
5.5.100.0070.00714.17
5.5.90.0030.00914.20
5.5.80.0000.00913.91
5.5.70.0080.00413.95
5.5.60.0030.01114.12
5.5.50.0000.00814.16
5.5.40.0080.00313.98
5.5.30.0070.00714.31
5.5.20.0000.00814.07
5.5.10.0040.00814.17
5.5.00.0030.01014.11
5.4.450.0030.04214.99
5.4.440.0030.03315.10
5.4.430.0030.03615.05
5.4.420.0040.04215.20
5.4.410.0070.02515.25
5.4.400.0060.03114.82
5.4.390.0040.03115.08
5.4.380.0020.04215.06
5.4.370.0020.04315.06
5.4.360.0030.03114.98
5.4.350.0050.03914.90
5.4.340.0050.04214.90
5.4.330.0000.01110.62
5.4.320.0020.04315.15
5.4.310.0050.04014.83
5.4.300.0040.03815.02
5.4.290.0070.03714.94
5.4.280.0030.02814.78
5.4.270.0030.03214.97
5.4.260.0000.03714.88
5.4.250.0050.02214.97
5.4.240.0010.02014.88
5.4.230.0050.03214.84
5.4.220.0020.02315.00
5.4.210.0000.02315.11
5.4.200.0040.01815.07
5.4.190.0030.02114.96
5.4.180.0000.02315.10
5.4.170.0030.02015.11
5.4.160.0020.02314.95
5.4.150.0020.02015.04
5.4.140.0020.02313.80
5.4.130.0010.02113.67
5.4.120.0020.02313.65
5.4.110.0050.01813.66
5.4.100.0040.01813.56
5.4.90.0020.02013.73
5.4.80.0040.02113.55
5.4.70.0020.02213.76
5.4.60.0050.01813.54
5.4.50.0020.02013.52
5.4.40.0030.02113.71
5.4.30.0030.02013.54
5.4.20.0060.01613.66
5.4.10.0020.01813.66
5.4.00.0020.02213.40
5.3.290.0040.02512.54
5.3.280.0020.02612.46
5.3.270.0020.02312.46
5.3.260.0000.02212.51
5.3.250.0030.02012.64
5.3.240.0050.01812.47
5.3.230.0100.01812.57
5.3.220.0020.02212.42
5.3.210.0030.02112.39
5.3.200.0010.02012.41
5.3.190.0040.02012.34
5.3.180.0020.02212.47
5.3.170.0030.02012.56
5.3.160.0030.02212.43
5.3.150.0030.02012.51
5.3.140.0060.01812.40
5.3.130.0000.02312.55
5.3.120.0000.02512.42
5.3.110.0020.02412.33
5.3.100.0020.01812.18
5.3.90.0020.01912.14
5.3.80.0020.02012.04
5.3.70.0020.02212.02
5.3.60.0050.02212.11
5.3.50.0000.02412.09
5.3.40.0000.02612.03
5.3.30.0040.04112.02
5.3.20.0030.03711.89
5.3.10.0050.02011.97
5.3.00.0070.03511.74
5.2.170.0000.03312.96
5.2.160.0000.03712.96
5.2.150.0000.05012.96
5.2.140.0000.03712.96
5.2.130.0030.04312.96
5.2.120.0070.06012.96
5.2.110.0200.02712.96
5.2.100.0030.05312.96
5.2.90.0030.03012.96
5.2.80.0000.05712.96
5.2.70.0000.05012.96
5.2.60.0000.05012.96
5.2.50.0030.03012.96
5.2.40.0030.04012.96
5.2.30.0070.02712.96
5.2.20.0000.03012.96
5.2.10.0070.05712.96
5.2.00.0030.04712.96
5.1.60.0030.04012.96
5.1.50.0030.03312.96
5.1.40.0000.04012.96
5.1.30.0030.04712.96
5.1.20.0070.04712.96
5.1.10.0000.05312.96
5.1.00.0030.04312.96
5.0.50.0030.04312.96
5.0.40.0030.02712.96
5.0.30.0030.06012.96
5.0.20.0030.03012.96
5.0.10.0030.02712.96
5.0.00.0070.05312.96
4.4.90.0000.03712.96
4.4.80.0000.01712.96
4.4.70.0000.02312.96
4.4.60.0030.01712.96
4.4.50.0000.01712.96
4.4.40.0030.05312.96
4.4.30.0000.02712.96
4.4.20.0030.03012.96
4.4.10.0000.03012.96
4.4.00.0000.04712.96
4.3.110.0000.02312.96
4.3.100.0000.03712.96
4.3.90.0000.03012.96
4.3.80.0030.05012.96
4.3.70.0070.02312.96
4.3.60.0030.03312.96
4.3.50.0070.03012.96
4.3.40.0030.05312.96
4.3.30.0030.03712.96
4.3.20.0000.03712.96
4.3.10.0000.02012.96
4.3.00.0000.02012.96

preferences:
47.26 ms | 401 KiB | 5 Q