3v4l.org

run code in 300+ PHP versions simultaneously
<?php $hrefPattern = '/<a\\s+([^>]*)href=(["\']??)(?P<link>[^"\'>]*?)\\2([^>]*)>(?P<text>.*)<\\/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.0150.00019.09
8.3.30.0120.00318.92
8.3.20.0050.00320.25
8.3.10.0040.00423.60
8.3.00.0080.00021.02
8.2.170.0120.00322.96
8.2.160.0110.00420.38
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00419.12
8.2.110.0070.00421.21
8.2.100.0090.00318.03
8.2.90.0080.00017.75
8.2.80.0000.00819.13
8.2.70.0090.00017.68
8.2.60.0080.00018.22
8.2.50.0000.00818.10
8.2.40.0040.00419.73
8.2.30.0040.00418.32
8.2.20.0030.00517.89
8.2.10.0040.00418.15
8.2.00.0090.00017.84
8.1.270.0060.00323.88
8.1.260.0030.00526.35
8.1.250.0050.00328.09
8.1.240.0040.00817.57
8.1.230.0060.00622.66
8.1.220.0060.00317.74
8.1.210.0060.00318.77
8.1.200.0090.00017.48
8.1.190.0050.00317.25
8.1.180.0000.00818.10
8.1.170.0050.00318.69
8.1.160.0000.00722.00
8.1.150.0070.00018.80
8.1.140.0060.00317.54
8.1.130.0040.00417.82
8.1.120.0070.00017.53
8.1.110.0020.00517.59
8.1.100.0040.00417.45
8.1.90.0040.00417.51
8.1.80.0080.00017.57
8.1.70.0000.00717.42
8.1.60.0030.00617.65
8.1.50.0030.00617.59
8.1.40.0000.00717.66
8.1.30.0050.00317.71
8.1.20.0030.00517.75
8.1.10.0040.00417.59
8.1.00.0000.00817.46
8.0.300.0000.00719.81
8.0.290.0040.00416.75
8.0.280.0030.00518.33
8.0.270.0070.00017.16
8.0.260.0030.00317.14
8.0.250.0070.00017.16
8.0.240.0040.00417.13
8.0.230.0000.00717.09
8.0.220.0050.00217.05
8.0.210.0030.00317.04
8.0.200.0000.00717.02
8.0.190.0040.00417.18
8.0.180.0040.00417.04
8.0.170.0040.00417.16
8.0.160.0040.00416.99
8.0.150.0000.00717.00
8.0.140.0040.00416.88
8.0.130.0030.00313.44
8.0.120.0040.00417.14
8.0.110.0040.00417.12
8.0.100.0050.00516.98
8.0.90.0050.00317.15
8.0.80.0070.01017.18
8.0.70.0060.00317.00
8.0.60.0050.00317.07
8.0.50.0040.00417.05
8.0.30.0140.00617.09
8.0.20.0130.01017.40
8.0.10.0020.00517.09
8.0.00.0100.00916.80
7.4.330.0000.00515.09
7.4.320.0030.00316.75
7.4.300.0030.00316.71
7.4.290.0000.00716.73
7.4.280.0030.00616.80
7.4.270.0050.00216.75
7.4.260.0040.00416.57
7.4.250.0040.00416.69
7.4.240.0070.00016.79
7.4.230.0000.00816.71
7.4.220.0090.00916.77
7.4.210.0060.01016.78
7.4.200.0000.00716.53
7.4.190.0040.00416.83
7.4.160.0070.01016.62
7.4.150.0140.00417.40
7.4.140.0130.00617.86
7.4.130.0150.00616.85
7.4.120.0160.00916.64
7.4.110.0080.01216.71
7.4.100.0150.00316.64
7.4.90.0090.01016.77
7.4.80.0040.01719.39
7.4.70.0090.00916.84
7.4.60.0160.00316.57
7.4.50.0020.00216.48
7.4.40.0120.00616.64
7.4.30.0140.00416.92
7.4.00.0090.00615.14
7.3.330.0030.00313.14
7.3.320.0030.00313.02
7.3.310.0070.00016.51
7.3.300.0000.00716.21
7.3.290.0040.01116.36
7.3.280.0090.00916.35
7.3.270.0080.01117.40
7.3.260.0120.00916.35
7.3.250.0090.01116.55
7.3.240.0180.01516.36
7.3.230.0090.00916.49
7.3.210.0120.00616.34
7.3.200.0140.00619.39
7.3.190.0090.00916.40
7.3.180.0120.00616.36
7.3.170.0160.00316.35
7.3.160.0040.01316.41
7.3.120.0040.00814.60
7.2.330.0100.01016.79
7.2.320.0170.00716.40
7.2.310.0130.00816.61
7.2.300.0170.00916.77
7.2.290.0070.01116.81
7.2.00.0000.01119.52
7.1.100.0040.01118.13
7.1.70.0050.00217.38
7.1.60.0100.01619.46
7.1.50.0060.01516.93
7.1.00.0070.07022.59
7.0.200.0040.00416.90
7.0.140.0070.07022.00
7.0.60.0070.08719.97
7.0.50.0100.08017.75
7.0.40.0030.09020.18
7.0.30.0300.08320.15
7.0.20.0270.05020.19
7.0.10.0030.08020.18
7.0.00.0030.05720.13
5.6.280.0070.07021.06
5.6.210.0200.07320.46
5.6.200.0030.05318.13
5.6.190.0000.04720.41
5.6.180.0000.04320.41
5.6.170.0470.02320.48
5.6.160.0100.03720.44
5.6.150.0170.02718.21
5.6.140.0070.07718.15
5.6.130.0070.08018.11
5.6.120.0070.04720.99
5.6.110.0070.08721.01
5.6.100.0070.08320.98
5.6.90.0170.08021.09
5.6.80.0070.03720.43
5.5.350.0100.06320.40
5.5.340.0000.06717.88
5.5.330.0070.07720.36
5.5.320.0100.08020.31
5.5.310.0200.05320.33
5.5.300.0030.05717.98
5.5.290.0030.07717.96
5.5.280.0000.05020.77
5.5.270.0130.08020.76
5.5.260.0030.07320.97
5.5.250.0000.04720.61
5.5.240.0000.07720.35
5.4.450.0100.04319.54
5.4.440.0270.05019.41
5.4.430.0830.05719.25
5.4.420.1070.05319.25
5.4.410.0970.05319.04
5.4.400.1330.04319.04
5.4.390.0670.06019.23
5.4.380.0300.03718.66
5.4.370.0230.05318.71
5.4.360.0170.04718.74
5.4.350.0230.04718.59
5.4.340.0200.07018.72
5.4.320.0080.04112.46
5.4.310.0070.03812.46
5.4.300.0060.03612.46
5.4.290.0070.03712.45
5.4.280.0070.03512.35
5.4.270.0050.03812.36
5.4.260.0080.03712.35
5.4.250.0070.03912.35
5.4.240.0080.03712.36
5.4.230.0100.04912.35
5.4.220.0050.04612.34
5.4.210.0080.03612.35
5.4.200.0060.04812.34
5.4.190.0080.04012.34
5.4.180.0080.04312.34
5.4.170.0070.03512.35
5.4.160.0050.03712.35
5.4.150.0060.04012.34
5.4.140.0090.03912.03
5.4.130.0080.03712.02
5.4.120.0020.04011.97
5.4.110.0090.03611.97
5.4.100.0050.03811.98
5.4.90.0050.04011.97
5.4.80.0070.03711.97
5.4.70.0080.03311.97
5.4.60.0090.03511.97
5.4.50.0070.04911.97
5.4.40.0080.03711.96
5.4.30.0090.03311.96
5.4.20.0070.03511.96
5.4.10.0080.03411.96
5.4.00.0050.03711.45
5.3.290.0060.05112.80
5.3.280.0090.03912.71
5.3.270.0080.04112.72
5.3.260.0080.05012.72
5.3.250.0050.04212.72
5.3.240.0020.04512.72
5.3.230.0050.04012.71
5.3.220.0080.03712.68
5.3.210.0050.04112.68
5.3.200.0070.03712.68
5.3.190.0070.04012.68
5.3.180.0060.03812.68
5.3.170.0070.03812.67
5.3.160.0090.03812.67
5.3.150.0050.04212.67
5.3.140.0080.03712.66
5.3.130.0060.04012.66
5.3.120.0070.04312.66
5.3.110.0110.03612.66
5.3.100.0070.03712.12
5.3.90.0090.04212.08
5.3.80.0130.03612.07
5.3.70.0080.04912.07
5.3.60.0060.04512.07
5.3.50.0030.04612.00
5.3.40.0070.03912.01
5.3.30.0100.03311.96
5.3.20.0120.04611.74
5.3.10.0100.03911.71
5.3.00.0160.05911.70
5.2.170.0050.0479.20
5.2.160.0080.0449.20
5.2.150.0130.0399.20
5.2.140.0220.0489.20
5.2.130.0120.0339.16
5.2.120.0090.0269.16
5.2.110.0100.0569.16
5.2.100.0060.0449.16
5.2.90.0050.0509.16
5.2.80.0140.0729.15
5.2.70.0090.0539.15
5.2.60.0110.0529.11
5.2.50.0200.0989.08
5.2.40.0050.0369.07
5.2.30.0140.0619.04
5.2.20.0150.0759.09
5.2.10.0070.0298.98
5.2.00.0060.0368.85
5.1.60.0080.0368.15
5.1.50.0100.0348.15
5.1.40.0070.0288.14
5.1.30.0080.0328.48
5.1.20.0150.0528.50
5.1.10.0080.0318.23
5.1.00.0080.0478.23
5.0.50.0070.0236.71
5.0.40.0080.0346.56
5.0.30.0070.0336.39
5.0.20.0350.0756.35
5.0.10.0120.0456.32
5.0.00.0070.0406.32
4.4.90.0080.0294.78
4.4.80.0140.0424.75
4.4.70.0090.0434.75
4.4.60.0180.0284.75
4.4.50.0130.0414.77
4.4.40.0100.0524.71
4.4.30.0210.0784.76
4.4.20.0180.0374.84
4.4.10.0090.0194.85
4.4.00.0060.0364.76
4.3.110.0040.0224.67
4.3.100.0050.0174.66
4.3.90.0040.0184.63
4.3.80.0050.0284.61
4.3.70.0040.0214.63
4.3.60.0040.0154.63
4.3.50.0020.0194.63
4.3.40.0060.0414.57
4.3.30.0050.0233.38
4.3.20.0030.0203.35
4.3.10.0030.0183.24
4.3.00.0230.01311.58

preferences:
47.41 ms | 400 KiB | 5 Q