3v4l.org

run code in 300+ PHP versions simultaneously
<?php $hrefPattern = '/<a\\s+[^>]*href=(["\']??)([^"\'>]*?)\\1([^>]*)>(.*)<\/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/">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 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); 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.0180.00016.75
8.3.50.0070.00922.06
8.3.40.0090.00618.93
8.3.30.0150.00619.13
8.3.20.0040.00420.34
8.3.10.0060.00323.64
8.3.00.0040.00419.19
8.2.180.0100.01018.41
8.2.170.0060.00922.96
8.2.160.0100.00320.43
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0050.00319.06
8.2.110.0000.00922.36
8.2.100.0000.01117.97
8.2.90.0050.00319.17
8.2.80.0000.00817.97
8.2.70.0030.00617.49
8.2.60.0000.00817.80
8.2.50.0040.00418.07
8.2.40.0040.00420.01
8.2.30.0070.00018.22
8.2.20.0000.00817.86
8.2.10.0040.00418.11
8.2.00.0050.00317.98
8.1.280.0070.00725.92
8.1.270.0030.00622.06
8.1.260.0050.00326.35
8.1.250.0000.00828.09
8.1.240.0060.00323.84
8.1.230.0110.00019.04
8.1.220.0030.00517.75
8.1.210.0080.00018.77
8.1.200.0120.00017.48
8.1.190.0090.00017.36
8.1.180.0040.00418.10
8.1.170.0050.00318.59
8.1.160.0050.00222.00
8.1.150.0040.00418.87
8.1.140.0060.00317.62
8.1.130.0030.00317.93
8.1.120.0040.00317.64
8.1.110.0090.00017.61
8.1.100.0070.00017.49
8.1.90.0040.00417.53
8.1.80.0080.00017.55
8.1.70.0030.00317.54
8.1.60.0040.00417.66
8.1.50.0000.00817.43
8.1.40.0060.00317.53
8.1.30.0000.00817.75
8.1.20.0030.00617.66
8.1.10.0040.00417.75
8.1.00.0060.00317.54
8.0.300.0000.00718.77
8.0.290.0000.00717.18
8.0.280.0040.00418.47
8.0.270.0070.00017.21
8.0.260.0060.00017.11
8.0.250.0030.00317.15
8.0.240.0000.01117.14
8.0.230.0030.00317.04
8.0.220.0000.00717.01
8.0.210.0080.00017.09
8.0.200.0030.00317.10
8.0.190.0030.00417.08
8.0.180.0070.00017.14
8.0.170.0040.00417.05
8.0.160.0030.00317.04
8.0.150.0040.00416.96
8.0.140.0070.00017.08
8.0.130.0060.00313.48
8.0.120.0090.00017.07
8.0.110.0070.00017.12
8.0.100.0000.00716.99
8.0.90.0040.00417.14
8.0.80.0090.00617.13
8.0.70.0070.00017.11
8.0.60.0030.00517.00
8.0.50.0050.00217.06
8.0.30.0090.01017.22
8.0.20.0130.00717.40
8.0.10.0000.00717.07
8.0.00.0070.01216.85
7.4.330.0030.00315.02
7.4.320.0000.00616.73
7.4.300.0030.00316.72
7.4.290.0070.00016.73
7.4.280.0060.00316.82
7.4.270.0070.00016.66
7.4.260.0030.00316.71
7.4.250.0040.00416.84
7.4.240.0000.00716.80
7.4.230.0000.00716.64
7.4.220.0000.01716.86
7.4.210.0090.00616.78
7.4.200.0030.00616.84
7.4.190.0030.00516.55
7.4.160.0070.01016.76
7.4.150.0090.00917.40
7.4.140.0100.00917.86
7.4.130.0110.00816.81
7.4.120.0060.01316.71
7.4.110.0090.00916.64
7.4.100.0160.00616.64
7.4.90.0000.01816.50
7.4.80.0080.01319.39
7.4.70.0100.00716.63
7.4.60.0110.00716.74
7.4.50.0000.00516.38
7.4.40.0120.00616.84
7.4.30.0100.00716.60
7.4.00.0070.01014.95
7.3.330.0030.00313.12
7.3.320.0050.00013.17
7.3.310.0030.00316.30
7.3.300.0040.00416.39
7.3.290.0130.00616.38
7.3.280.0090.00916.37
7.3.270.0110.00717.40
7.3.260.0060.01316.43
7.3.250.0130.01016.37
7.3.240.0030.01616.40
7.3.230.0110.00616.41
7.3.210.0200.00316.33
7.3.200.0120.00619.39
7.3.190.0070.01116.49
7.3.180.0090.00916.27
7.3.170.0080.00816.30
7.3.160.0100.00716.43
7.3.120.0060.00914.92
7.2.330.0070.01316.49
7.2.320.0090.01016.55
7.2.310.0060.01516.41
7.2.300.0040.01516.62
7.2.290.0120.00516.42
7.1.200.0070.00315.82
7.1.70.0030.00717.37
7.1.60.0140.01019.46
7.1.50.0100.01317.04
7.1.00.0030.07722.46
7.0.200.0000.00816.99
7.0.140.0000.07322.04
7.0.60.0030.04320.01
7.0.50.0030.04017.93
7.0.40.0030.04719.93
7.0.30.0130.05020.22
7.0.20.0170.04020.02
7.0.10.0100.08320.12
7.0.00.0030.04320.24
5.6.280.0070.07020.78
5.6.210.0070.08020.56
5.6.200.0100.03718.24
5.6.190.0100.08020.39
5.6.180.0300.08320.63
5.6.170.0330.06020.38
5.6.160.0070.07720.37
5.6.150.0030.08318.10
5.6.140.0030.05018.20
5.6.130.0070.05718.18
5.6.120.0100.07021.00
5.6.110.0030.04020.96
5.6.100.0070.08720.99
5.6.90.0130.07721.07
5.6.80.0130.06020.40
5.5.350.0070.07720.34
5.5.340.0070.07717.92
5.5.330.0130.07720.29
5.5.320.0200.04320.29
5.5.310.1130.04720.29
5.5.300.0030.09017.91
5.5.290.0100.07717.95
5.5.280.0130.07720.97
5.5.270.0030.09020.72
5.5.260.0030.09320.77
5.5.250.0070.08320.68
5.5.240.0230.07020.11
5.4.450.0200.03719.57
5.4.440.0230.03019.57
5.4.430.0170.04319.57
5.4.420.0270.03019.41
5.4.410.0200.04019.02
5.4.400.0300.02719.09
5.4.390.0270.05719.07
5.4.380.0230.07018.79
5.4.370.0370.08019.13
5.4.360.0300.07019.25
5.4.350.0230.05019.09
5.4.340.0230.08019.17
5.4.320.0330.06719.24
5.4.310.0330.05319.20
5.4.300.0270.04719.24
5.4.290.0230.04019.08
5.4.280.0230.05719.07
5.4.270.0230.07718.79
5.4.260.0330.05018.93
5.4.250.0370.07319.23
5.4.240.0200.04318.78
5.4.230.0300.07719.21
5.4.220.0270.04718.88
5.4.210.0200.06319.23
5.4.200.0300.06019.07
5.4.190.0300.07019.13
5.4.180.0230.05719.07
5.4.170.0330.04719.24
5.4.160.0300.07019.06
5.4.150.0170.05719.04
5.4.140.0370.06016.45
5.4.130.0270.04716.31
5.4.120.0330.05316.29
5.4.110.0330.03316.39
5.4.100.0300.05316.39
5.4.90.0230.04016.34
5.4.80.0200.04316.46
5.4.70.0200.05016.46
5.4.60.0330.06016.36
5.4.50.0230.04316.23
5.4.40.0270.05016.40
5.4.30.0230.05016.41
5.4.20.0330.02316.36
5.4.10.0270.05316.31
5.4.00.0270.06315.68
5.3.290.0300.04314.71
5.3.280.0200.04714.46
5.3.270.0230.04314.54
5.3.260.0300.06714.69
5.3.250.0330.04714.48
5.3.240.0200.05714.58
5.3.230.0270.07314.57
5.3.220.0230.04714.44
5.3.210.0230.04314.47
5.3.200.0230.03714.41
5.3.190.0200.04714.47
5.3.180.0270.05314.47
5.3.170.0270.04014.47
5.3.160.0270.04014.44
5.3.150.0270.06314.39
5.3.140.0270.06714.58
5.3.130.0170.05314.42
5.3.120.0200.04014.42
5.3.110.0170.04314.41
5.3.100.0330.04314.07
5.3.90.0230.03313.88
5.3.80.0300.03014.05
5.3.70.0130.04313.85
5.3.60.0230.03313.80
5.3.50.0230.05313.89
5.3.40.0270.06313.72
5.3.30.0330.05013.68
5.3.20.0330.06713.47
5.3.10.0300.06713.56
5.3.00.0300.06313.63
5.2.170.0200.04012.55
5.2.160.0170.03712.55
5.2.150.0230.06012.55
5.2.140.0230.04012.55
5.2.130.0270.05712.55
5.2.120.0230.04712.55
5.2.110.0230.05012.55
5.2.100.0200.06312.55
5.2.90.0230.05312.55
5.2.80.0230.03012.55
5.2.70.0200.06712.55
5.2.60.0230.03712.55
5.2.50.0330.05012.55
5.2.40.0230.05012.55
5.2.30.0170.05712.55
5.2.20.0170.04712.55
5.2.10.0200.03712.55
5.2.00.0200.05312.55
5.1.60.0200.05012.55
5.1.50.0270.04012.55
5.1.40.0230.03712.55
5.1.30.0230.05312.55
5.1.20.0270.02312.55
5.1.10.0170.02712.55
5.1.00.0200.05312.55
5.0.50.0170.04312.55
5.0.40.0130.02312.55
5.0.30.0170.06012.55
5.0.20.0100.02712.55
5.0.10.0170.02712.55
5.0.00.0170.05012.55
4.4.90.0300.02312.55
4.4.80.0100.03312.55
4.4.70.0070.02712.55
4.4.60.0130.03012.55
4.4.50.0070.04012.55
4.4.40.0070.03712.55
4.4.30.0100.03712.55
4.4.20.0100.02012.55
4.4.10.0100.03312.55
4.4.00.0100.04012.55
4.3.110.0070.03312.55
4.3.100.0100.03312.55
4.3.90.0100.02312.55
4.3.80.0170.04712.55
4.3.70.0170.03312.55
4.3.60.0130.02012.55
4.3.50.0100.03312.55
4.3.40.0130.04312.55
4.3.30.0070.02012.55
4.3.20.0100.03312.55
4.3.10.0030.03712.55
4.3.00.0030.02312.55

preferences:
32.04 ms | 401 KiB | 5 Q