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/" 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.0120.00316.75
8.3.50.0090.01022.14
8.3.40.0130.00619.10
8.3.30.0110.00418.96
8.3.20.0050.00320.33
8.3.10.0040.00423.47
8.3.00.0080.00020.68
8.2.180.0090.00918.54
8.2.170.0120.00322.96
8.2.160.0030.01020.39
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0030.00626.16
8.2.120.0030.00619.11
8.2.110.0100.00021.16
8.2.100.0080.00317.91
8.2.90.0080.00019.22
8.2.80.0080.00017.97
8.2.70.0060.00317.63
8.2.60.0080.00017.91
8.2.50.0030.00518.07
8.2.40.0000.00819.99
8.2.30.0070.00018.19
8.2.20.0060.00317.77
8.2.10.0040.00418.11
8.2.00.0080.00017.77
8.1.280.0070.01425.92
8.1.270.0080.00023.80
8.1.260.0030.00626.35
8.1.250.0040.00428.09
8.1.240.0030.00719.34
8.1.230.0060.00622.13
8.1.220.0000.00917.74
8.1.210.0030.00618.77
8.1.200.0040.00717.35
8.1.190.0030.00517.35
8.1.180.0000.00819.13
8.1.170.0050.00318.78
8.1.160.0030.00522.00
8.1.150.0040.00418.85
8.1.140.0000.00817.56
8.1.130.0030.00317.89
8.1.120.0040.00417.48
8.1.110.0040.00417.43
8.1.100.0070.00017.57
8.1.90.0040.00417.52
8.1.80.0040.00417.52
8.1.70.0000.00717.54
8.1.60.0040.00417.70
8.1.50.0000.00817.52
8.1.40.0000.00717.59
8.1.30.0060.00317.74
8.1.20.0040.00417.60
8.1.10.0050.00317.66
8.1.00.0040.00417.67
8.0.300.0040.00418.77
8.0.290.0040.00417.16
8.0.280.0030.00318.43
8.0.270.0020.00517.24
8.0.260.0060.00017.24
8.0.250.0000.00717.13
8.0.240.0030.00617.01
8.0.230.0000.00716.96
8.0.220.0030.00317.00
8.0.210.0030.00317.02
8.0.200.0030.00317.11
8.0.190.0070.00017.08
8.0.180.0080.00017.02
8.0.170.0040.00416.99
8.0.160.0040.00417.03
8.0.150.0000.00716.90
8.0.140.0040.00416.94
8.0.130.0000.00613.52
8.0.120.0050.00417.05
8.0.110.0040.00417.03
8.0.100.0040.00717.24
8.0.90.0050.00317.00
8.0.80.0060.00917.06
8.0.70.0000.00717.19
8.0.60.0050.00317.00
8.0.50.0000.00817.10
8.0.30.0100.01017.06
8.0.20.0130.00617.40
8.0.10.0070.00017.31
8.0.00.0110.00716.86
7.4.330.0030.00315.03
7.4.320.0000.00616.86
7.4.300.0040.00416.64
7.4.290.0070.00016.82
7.4.280.0050.00216.63
7.4.270.0020.00516.69
7.4.260.0030.00516.79
7.4.250.0040.00416.56
7.4.240.0020.00616.76
7.4.230.0000.00716.83
7.4.220.0000.01816.78
7.4.210.0080.00716.85
7.4.200.0030.00516.81
7.4.190.0000.00716.58
7.4.160.0040.01216.61
7.4.150.0090.00917.40
7.4.140.0120.00917.86
7.4.130.0030.01616.74
7.4.120.0110.00716.64
7.4.110.0110.00816.73
7.4.100.0100.01016.75
7.4.90.0110.00616.65
7.4.80.0180.00619.39
7.4.70.0030.01316.71
7.4.60.0130.00616.70
7.4.50.0040.00416.66
7.4.40.0070.01016.61
7.4.30.0090.01216.50
7.4.00.0070.01114.98
7.3.330.0060.00013.20
7.3.320.0030.00313.29
7.3.310.0070.00016.40
7.3.300.0000.00716.38
7.3.290.0110.00316.26
7.3.280.0060.01416.35
7.3.270.0110.00717.40
7.3.260.0150.01016.59
7.3.250.0090.01116.36
7.3.240.0040.01416.39
7.3.230.0070.01016.39
7.3.210.0100.00716.55
7.3.200.0150.00719.39
7.3.190.0140.00716.72
7.3.180.0030.01316.61
7.3.170.0110.00616.71
7.3.160.0160.00016.77
7.3.120.0100.00815.00
7.3.110.0050.01215.04
7.3.100.0040.00814.73
7.3.90.0110.00614.78
7.3.80.0060.00714.82
7.3.70.0060.00714.86
7.3.60.0050.00914.87
7.3.50.0090.00514.79
7.3.40.0050.00714.84
7.3.30.0060.00514.80
7.3.20.0070.00716.77
7.3.10.0020.00916.61
7.3.00.0040.00916.86
7.2.330.0100.01316.66
7.2.320.0090.01216.57
7.2.310.0100.01016.63
7.2.300.0120.00616.56
7.2.290.0170.00616.61
7.2.250.0080.01015.13
7.2.240.0100.01115.01
7.2.230.0070.00715.05
7.2.220.0100.00815.07
7.2.210.0060.00715.06
7.2.200.0100.00815.10
7.2.190.0020.01414.90
7.2.180.0050.00814.96
7.2.170.0100.00515.00
7.2.00.0030.00619.38
7.1.330.0030.01015.63
7.1.320.0110.00415.97
7.1.310.0070.00315.78
7.1.300.0060.00815.97
7.1.290.0040.00915.78
7.1.280.0050.01015.78
7.1.270.0070.00715.99
7.1.260.0050.00515.88
7.1.100.0060.00318.10
7.1.70.0040.00417.41
7.1.60.0070.01819.46
7.1.50.0110.01417.14
7.1.00.0030.07722.32
7.0.200.0000.00716.54
7.0.140.0130.06322.21
7.0.60.0200.06720.00
7.0.50.0070.03717.95
7.0.40.0070.08320.26
7.0.30.0230.04320.07
7.0.20.0370.08320.11
7.0.10.0200.05320.32
7.0.00.0030.05720.05
5.6.280.0000.07720.86
5.6.210.0100.07020.69
5.6.200.0070.08318.15
5.6.190.0030.09320.57
5.6.180.0070.07320.59
5.6.170.0300.08020.48
5.6.160.0070.04020.38
5.6.150.0070.08318.18
5.6.140.0100.08018.15
5.6.130.0100.08318.11
5.6.120.0100.07720.99
5.6.110.0100.08721.08
5.6.100.0030.04721.02
5.6.90.0030.04320.94
5.6.80.0000.05320.39
5.5.350.0000.03720.41
5.5.340.0170.06717.97
5.5.330.0170.07320.25
5.5.320.0070.06720.17
5.5.310.0470.06320.13
5.5.300.0030.04717.94
5.5.290.0000.04318.02
5.5.280.0100.08020.79
5.5.270.0030.04320.73
5.5.260.0030.04320.79
5.5.250.0030.07020.47
5.5.240.0100.06320.15
5.4.450.0500.04719.37
5.4.440.0200.05019.57
5.4.430.0770.05719.22
5.4.420.0730.07019.44
5.4.410.0730.06319.19
5.4.400.0730.06019.18
5.4.390.0800.07718.92
5.4.380.0200.04718.59
5.4.370.0200.04318.46
5.4.360.0200.04318.65
5.4.350.0170.05018.74
5.4.340.0030.06018.62
5.4.320.0040.03812.45
5.4.310.0070.03712.45
5.4.300.0050.03812.45
5.4.290.0070.04012.45
5.4.280.0060.04012.35
5.4.270.0100.05812.34
5.4.260.0100.05012.35
5.4.250.0100.03612.34
5.4.240.0070.03612.35
5.4.230.0060.03812.34
5.4.220.0070.05012.34
5.4.210.0060.04412.34
5.4.200.0040.04212.34
5.4.190.0040.04012.33
5.4.180.0070.04112.34
5.4.170.0060.03712.34
5.4.160.0080.03512.34
5.4.150.0060.03912.34
5.4.140.0070.04712.02
5.4.130.0090.04712.01
5.4.120.0090.04211.97
5.4.110.0090.05511.96
5.4.100.0110.04311.96
5.4.90.0070.05311.96
5.4.80.0140.06011.96
5.4.70.0120.04911.96
5.4.60.0070.04311.96
5.4.50.0060.04011.96
5.4.40.0060.05011.95
5.4.30.0090.04711.95
5.4.20.0110.04411.95
5.4.10.0100.05411.95
5.4.00.0060.05211.43
5.3.290.0060.04012.80
5.3.280.0090.04812.71
5.3.270.0100.05812.73
5.3.260.0100.07812.72
5.3.250.0100.05512.71
5.3.240.0100.05012.72
5.3.230.0080.03812.70
5.3.220.0070.04412.68
5.3.210.0050.05212.68
5.3.200.0120.06212.68
5.3.190.0070.03912.68
5.3.180.0180.06912.67
5.3.170.0090.03612.67
5.3.160.0090.03712.68
5.3.150.0090.04112.67
5.3.140.0120.09812.66
5.3.130.0080.05312.66
5.3.120.0120.04912.66
5.3.110.0050.06912.65
5.3.100.0140.09612.12
5.3.90.0100.06112.09
5.3.80.0130.08812.07
5.3.70.0080.06812.07
5.3.60.0080.04312.06
5.3.50.0100.05912.00
5.3.40.0140.06812.00
5.3.30.0140.05611.96
5.3.20.0170.05611.73
5.3.10.0110.06711.70
5.3.00.0070.04811.69
5.2.170.0140.0599.19
5.2.160.0050.0439.18
5.2.150.0060.0439.19
5.2.140.0100.0389.18
5.2.130.0050.0519.14
5.2.120.0090.0399.14
5.2.110.0090.0599.15
5.2.100.0150.0369.15
5.2.90.0100.0369.15
5.2.80.0080.0449.14
5.2.70.0090.0409.15
5.2.60.0110.0379.10
5.2.50.0040.0509.07
5.2.40.0060.0359.05
5.2.30.0050.0679.03
5.2.20.0070.0389.05
5.2.10.0080.0438.96
5.2.00.0080.0338.82
5.1.60.0100.0478.13
5.1.50.0130.0448.13
5.1.40.0100.0498.11
5.1.30.0120.0438.46
5.1.20.0090.0538.48
5.1.10.0040.0388.21
5.1.00.0070.0298.21
5.0.50.0050.0236.69
5.0.40.0100.0286.56
5.0.30.0080.0386.36
5.0.20.0040.0366.33
5.0.10.0060.0266.30
5.0.00.0060.0426.30
4.4.90.0050.0344.77
4.4.80.0060.0254.75
4.4.70.0070.0204.75
4.4.60.0030.0294.76
4.4.50.0090.0254.77
4.4.40.0100.0484.71
4.4.30.0060.0224.75
4.4.20.0030.0304.85
4.4.10.0060.0234.85
4.4.00.0050.0354.76
4.3.110.0040.0244.67
4.3.100.0050.0234.66
4.3.90.0040.0304.64
4.3.80.0070.0314.59
4.3.70.0060.0304.63
4.3.60.0050.0254.63
4.3.50.0020.0304.63
4.3.40.0060.0424.54
4.3.30.0050.0443.36
4.3.20.0030.0313.33
4.3.10.0040.0163.21
4.3.00.0030.02011.59

preferences:
45.45 ms | 401 KiB | 5 Q