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> 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.0070.00718.43
8.3.50.0130.00722.13
8.3.40.0110.00418.92
8.3.30.0040.01119.03
8.3.20.0040.00420.25
8.3.10.0030.00623.54
8.3.00.0050.00320.82
8.2.180.0090.00618.41
8.2.170.0120.00322.96
8.2.160.0100.00320.36
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0030.00519.13
8.2.110.0090.00019.34
8.2.100.0060.00918.03
8.2.90.0050.00319.04
8.2.80.0030.00617.97
8.2.70.0040.00417.63
8.2.60.0030.00618.04
8.2.50.0030.00518.10
8.2.40.0040.00420.01
8.2.30.0000.00718.27
8.2.20.0080.00017.90
8.2.10.0000.00717.98
8.2.00.0080.00017.89
8.1.280.0000.01425.92
8.1.270.0030.00523.83
8.1.260.0080.00026.35
8.1.250.0050.00328.09
8.1.240.0090.00023.83
8.1.230.0080.00417.89
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0000.00917.48
8.1.190.0040.00417.25
8.1.180.0080.00018.10
8.1.170.0000.00918.38
8.1.160.0000.00822.02
8.1.150.0040.00418.81
8.1.140.0000.00917.63
8.1.130.0000.00717.89
8.1.120.0040.00417.59
8.1.110.0030.00617.60
8.1.100.0000.00717.56
8.1.90.0040.00417.57
8.1.80.0050.00317.59
8.1.70.0070.00017.52
8.1.60.0070.00317.73
8.1.50.0000.00817.59
8.1.40.0000.00917.51
8.1.30.0050.00317.68
8.1.20.0000.00817.77
8.1.10.0030.00517.59
8.1.00.0040.00417.63
8.0.300.0000.00718.77
8.0.290.0040.00416.74
8.0.280.0030.00318.41
8.0.270.0030.00317.15
8.0.260.0030.00317.15
8.0.250.0040.00417.20
8.0.240.0030.00617.09
8.0.230.0030.00316.95
8.0.220.0030.00317.11
8.0.210.0030.00316.95
8.0.200.0000.00617.12
8.0.190.0000.00717.00
8.0.180.0070.00017.09
8.0.170.0040.00417.10
8.0.160.0030.00316.95
8.0.150.0000.00716.91
8.0.140.0000.00817.02
8.0.130.0040.00513.55
8.0.120.0090.00017.14
8.0.110.0000.00817.13
8.0.100.0040.00716.91
8.0.90.0030.00517.03
8.0.80.0070.01317.16
8.0.70.0040.00417.02
8.0.60.0000.00717.03
8.0.50.0000.00816.95
8.0.30.0090.01117.24
8.0.20.0100.01317.40
8.0.10.0000.00817.12
8.0.00.0150.00416.99
7.4.330.0020.00215.09
7.4.320.0000.00616.64
7.4.300.0060.00016.85
7.4.290.0000.00716.76
7.4.280.0000.00816.74
7.4.270.0040.00316.89
7.4.260.0030.00316.74
7.4.250.0040.00416.79
7.4.240.0020.00516.69
7.4.230.0050.00316.91
7.4.220.0110.00716.83
7.4.210.0070.00716.77
7.4.200.0050.00316.86
7.4.190.0040.00416.84
7.4.160.0090.01216.70
7.4.150.0190.00617.40
7.4.140.0090.01217.86
7.4.130.0090.01416.67
7.4.120.0070.01116.70
7.4.110.0150.00316.75
7.4.100.0090.01716.53
7.4.90.0070.01016.69
7.4.80.0130.01019.39
7.4.70.0060.00916.67
7.4.60.0110.00716.76
7.4.50.0000.00916.44
7.4.40.0030.01316.46
7.4.30.0130.00316.76
7.4.10.0030.01616.63
7.4.00.0100.00815.60
7.3.330.0050.00013.12
7.3.320.0030.00313.26
7.3.310.0000.00716.24
7.3.300.0070.00016.36
7.3.290.0000.01416.36
7.3.280.0090.00916.36
7.3.270.0120.01217.40
7.3.260.0110.00816.54
7.3.250.0090.01116.55
7.3.240.0030.01816.45
7.3.230.0060.01216.61
7.3.210.0060.01016.36
7.3.200.0080.01619.39
7.3.190.0060.01216.59
7.3.180.0110.00616.34
7.3.170.0060.01116.33
7.3.160.0090.00916.40
7.3.130.0080.01016.71
7.3.120.0070.00915.65
7.3.110.0030.01215.68
7.3.100.0090.00715.63
7.3.90.0090.00715.63
7.3.80.0040.01115.35
7.3.70.0110.00915.67
7.3.60.0130.00615.72
7.3.50.0050.01015.63
7.3.40.0040.01015.47
7.3.30.0040.01115.62
7.3.20.0080.00616.57
7.3.10.0050.00816.54
7.3.00.0100.00616.45
7.2.330.0080.01116.57
7.2.320.0080.01816.66
7.2.310.0140.00716.66
7.2.300.0120.00616.72
7.2.290.0100.00816.69
7.2.260.0060.00916.54
7.2.250.0100.00915.74
7.2.240.0090.00615.82
7.2.230.0060.00815.70
7.2.220.0060.00615.74
7.2.210.0090.00815.83
7.2.200.0080.01015.79
7.2.190.0040.01015.84
7.2.180.0080.00815.84
7.2.170.0060.00815.61
7.2.160.0090.00815.66
7.2.150.0060.00716.58
7.2.140.0090.00716.66
7.2.130.0080.00716.66
7.2.120.0090.00716.70
7.2.110.0080.00916.76
7.2.100.0040.01116.73
7.2.90.0070.00716.82
7.2.80.0070.00916.82
7.2.70.0110.00916.68
7.2.60.0120.00416.72
7.2.50.0050.01016.76
7.2.40.0070.01016.79
7.2.30.0070.00816.71
7.2.20.0100.00416.73
7.2.10.0080.00616.70
7.2.00.0090.00717.68
7.1.330.0050.01315.75
7.1.320.0090.00415.84
7.1.310.0060.01015.88
7.1.300.0040.01015.76
7.1.290.0030.01215.68
7.1.280.0100.00615.63
7.1.270.0060.00815.68
7.1.260.0040.01215.64
7.1.250.0050.01015.82
7.1.240.0120.00515.78
7.1.230.0100.00915.82
7.1.220.0100.01015.68
7.1.210.0130.00215.75
7.1.200.0070.00915.78
7.1.190.0140.00615.72
7.1.180.0130.00515.58
7.1.170.0120.00815.80
7.1.160.0140.00815.82
7.1.150.0100.01015.75
7.1.140.0050.01615.68
7.1.130.0140.00315.69
7.1.120.0090.00915.87
7.1.110.0110.00815.82
7.1.100.0070.00816.37
7.1.90.0080.00815.62
7.1.80.0090.00615.60
7.1.70.0080.00716.36
7.1.60.0090.01016.82
7.1.50.0070.01016.25
7.1.40.0080.00815.68
7.1.30.0130.00315.66
7.1.20.0070.00615.71
7.1.10.0150.00315.77
7.1.00.0120.03217.98
7.0.330.0100.00615.41
7.0.320.0170.00415.52
7.0.310.0160.01015.60
7.0.300.0140.00815.29
7.0.290.0100.00715.50
7.0.280.0140.00315.53
7.0.270.0070.00715.31
7.0.260.0150.00215.34
7.0.250.0050.01015.58
7.0.240.0080.00715.42
7.0.230.0060.00815.34
7.0.220.0250.00815.20
7.0.210.0070.00815.40
7.0.200.0070.00715.78
7.0.190.0060.00915.28
7.0.180.0040.01015.48
7.0.170.0100.00315.31
7.0.160.0030.01015.36
7.0.150.0140.00315.60
7.0.140.0090.02717.58
7.0.130.0080.00715.24
7.0.120.0090.00715.29
7.0.110.0040.01115.46
7.0.100.0070.01215.35
7.0.90.0080.00515.31
7.0.80.0110.00515.30
7.0.70.0110.00715.49
7.0.60.0120.03216.99
7.0.50.0040.02116.17
7.0.40.0110.02616.32
7.0.30.0120.02116.33
7.0.20.0140.02316.40
7.0.10.0100.03216.35
7.0.00.0110.02916.24
5.6.400.0100.00614.79
5.6.390.0090.00514.88
5.6.380.0070.00815.10
5.6.370.0070.01114.92
5.6.360.0080.01015.14
5.6.350.0060.01015.06
5.6.340.0140.00814.85
5.6.330.0140.00414.80
5.6.320.0060.01115.18
5.6.310.0130.00215.00
5.6.300.0060.00814.98
5.6.290.0080.00915.02
5.6.280.0080.02816.96
5.6.270.0080.01014.93
5.6.260.0120.00215.06
5.6.250.0090.00515.04
5.6.240.0120.00315.13
5.6.230.0090.00914.99
5.6.220.0110.00814.96
5.6.210.0090.03316.86
5.6.200.0090.02016.08
5.6.190.0100.02316.85
5.6.180.0230.02516.70
5.6.170.0110.03316.78
5.6.160.0090.02516.80
5.6.150.0130.02916.19
5.6.140.0040.02216.00
5.6.130.0100.02916.03
5.6.120.0060.02216.95
5.6.110.0090.02816.99
5.6.100.0070.03217.01
5.6.90.0130.01817.15
5.6.80.0100.02916.82
5.6.70.0080.00814.91
5.6.60.0070.00714.68
5.6.50.0110.00514.89
5.6.40.0090.00714.89
5.6.30.0090.00814.96
5.6.20.0120.00915.08
5.6.10.0090.00914.95
5.6.00.0060.01014.96
5.5.380.0080.00514.98
5.5.370.0080.00714.76
5.5.360.0110.00615.06
5.5.350.0130.03116.70
5.5.340.0080.02815.97
5.5.330.0100.03116.65
5.5.320.0170.02516.73
5.5.310.0130.02416.73
5.5.300.0070.02915.92
5.5.290.0090.03316.00
5.5.280.0080.03016.85
5.5.270.0100.03216.95
5.5.260.0070.01616.89
5.5.250.0060.02616.71
5.5.240.0120.03216.63
5.5.230.0090.01014.94
5.5.220.0080.00914.81
5.5.210.0080.01114.97
5.5.200.0040.01214.73
5.5.190.0080.00914.97
5.5.180.0130.00414.89
5.5.170.0110.00514.76
5.5.160.0080.00714.88
5.5.150.0110.00514.94
5.5.140.0090.00514.85
5.5.130.0030.01114.99
5.5.120.0080.00814.98
5.5.110.0090.00514.73
5.5.100.0090.00414.66
5.5.90.0040.00914.63
5.5.80.0070.00814.95
5.5.70.0090.00314.89
5.5.60.0020.01514.88
5.5.50.0080.00914.75
5.5.40.0080.00914.63
5.5.30.0100.00314.94
5.5.20.0100.00514.86
5.5.10.0030.01514.89
5.5.00.0070.00714.84
5.4.450.0100.01914.20
5.4.440.0140.02014.38
5.4.430.0430.02214.37
5.4.420.0400.02514.21
5.4.410.0270.02014.32
5.4.400.0270.02214.10
5.4.390.0330.02114.08
5.4.380.0120.02013.96
5.4.370.0070.02513.88
5.4.360.0060.02914.00
5.4.350.0090.02213.95
5.4.340.0070.02114.00
5.4.330.0050.00711.69
5.4.320.0060.01711.92
5.4.310.0070.01611.91
5.4.300.0060.01811.89
5.4.290.0070.03011.97
5.4.280.0090.02711.76
5.4.270.0080.02311.91
5.4.260.0070.02611.85
5.4.250.0080.02211.79
5.4.240.0100.02211.88
5.4.230.0080.02211.83
5.4.220.0050.02111.88
5.4.210.0080.01711.93
5.4.200.0080.01911.78
5.4.190.0060.02611.79
5.4.180.0080.02011.86
5.4.170.0070.02311.86
5.4.160.0100.01811.78
5.4.150.0070.02111.82
5.4.140.0100.01911.90
5.4.130.0100.01911.81
5.4.120.0070.02311.80
5.4.110.0090.02111.89
5.4.100.0060.01911.76
5.4.90.0080.01811.70
5.4.80.0070.01911.74
5.4.70.0080.01711.76
5.4.60.0090.01811.84
5.4.50.0060.01811.77
5.4.40.0040.01911.86
5.4.30.0050.02111.78
5.4.20.0100.02011.73
5.4.10.0090.01511.79
5.4.00.0130.02911.58
5.3.290.0060.01812.05
5.3.280.0090.01911.99
5.3.270.0040.02512.11
5.3.260.0070.02711.95
5.3.250.0060.02512.02
5.3.240.0080.02411.90
5.3.230.0060.02411.92
5.3.220.0140.03511.95
5.3.210.0080.02012.04
5.3.200.0070.01611.98
5.3.190.0090.01712.00
5.3.180.0060.01811.99
5.3.170.0080.02011.95
5.3.160.0060.02812.03
5.3.150.0060.02212.03
5.3.140.0060.01812.04
5.3.130.0050.02011.91
5.3.120.0040.02111.91
5.3.110.0070.01612.04
5.3.100.0070.01611.77
5.3.90.0070.02311.82
5.3.80.0070.01611.60
5.3.70.0080.01611.54
5.3.60.0070.01611.78
5.3.50.0070.01511.58
5.3.40.0070.01611.71
5.3.30.0080.01911.68
5.3.20.0020.02311.61
5.3.10.0070.01711.41
5.3.00.0060.01611.51
5.2.170.0050.0199.25
5.2.160.0060.0189.36
5.2.150.0070.0189.27
5.2.140.0090.0189.30
5.2.130.0080.0169.24
5.2.120.0060.0189.21
5.2.110.0050.0199.21
5.2.100.0070.0169.21
5.2.90.0060.0179.24
5.2.80.0060.0219.21
5.2.70.0090.0209.22
5.2.60.0040.0209.18
5.2.50.0100.0169.17
5.2.40.0110.0169.16
5.2.30.0070.0239.15
5.2.20.0040.0209.16
5.2.10.0020.0229.12
5.2.00.0090.0149.04
5.1.60.0070.0138.70
5.1.50.0070.0148.70
5.1.40.0080.0148.69
5.1.30.0040.0168.87
5.1.20.0070.0148.88
5.1.10.0090.0208.74
5.1.00.0070.0198.74
5.0.50.0060.0157.98
5.0.40.0050.0117.91
5.0.30.0060.0207.81
5.0.20.0070.0197.80
5.0.10.0060.0167.79
5.0.00.0040.0247.79
4.4.90.0050.0087.02
4.4.80.0030.0107.01
4.4.70.0020.0137.01
4.4.60.0020.0117.01
4.4.50.0030.0107.02
4.4.40.0020.0196.99
4.4.30.0040.0107.01
4.4.20.0020.0157.06
4.4.10.0050.0127.06
4.4.00.0050.0217.01
4.3.110.0020.0116.97
4.3.100.0060.0086.97
4.3.90.0060.0066.95
4.3.80.0040.0146.93
4.3.70.0040.0126.95
4.3.60.0040.0116.95
4.3.50.0050.0096.95
4.3.40.0040.0146.91
4.3.30.0020.0106.31
4.3.20.0040.0106.30
4.3.10.0030.0106.24
4.3.00.0040.01010.43

preferences:
48.52 ms | 401 KiB | 5 Q