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 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.0060.01216.61
8.3.50.0070.01122.14
8.3.40.0040.01118.93
8.3.30.0110.00319.09
8.3.20.0040.00420.34
8.3.10.0050.00323.51
8.3.00.0030.00520.77
8.2.180.0160.00018.31
8.2.170.0110.00422.96
8.2.160.0070.00720.48
8.2.150.0000.00824.18
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0050.00320.85
8.2.110.0030.00622.14
8.2.100.0040.00817.91
8.2.90.0030.00619.05
8.2.80.0030.00517.97
8.2.70.0040.00417.88
8.2.60.0000.00817.80
8.2.50.0040.00418.07
8.2.40.0030.00620.07
8.2.30.0000.00718.32
8.2.20.0030.00717.80
8.2.10.0000.00818.02
8.2.00.0000.00717.74
8.1.280.0110.00425.92
8.1.270.0050.00323.83
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00323.86
8.1.230.0090.00319.16
8.1.220.0050.00317.79
8.1.210.0050.00318.77
8.1.200.0000.00917.35
8.1.190.0030.00617.36
8.1.180.0000.00819.13
8.1.170.0080.00018.50
8.1.160.0000.00721.93
8.1.150.0080.00018.82
8.1.140.0040.00417.58
8.1.130.0040.00417.93
8.1.120.0000.00717.57
8.1.110.0050.00217.58
8.1.100.0080.00017.43
8.1.90.0040.00417.58
8.1.80.0000.00717.58
8.1.70.0040.00417.50
8.1.60.0030.00617.64
8.1.50.0050.00317.58
8.1.40.0000.00917.59
8.1.30.0050.00317.66
8.1.20.0030.00517.80
8.1.10.0000.00717.66
8.1.00.0040.00417.63
8.0.300.0070.00018.77
8.0.290.0040.00417.04
8.0.280.0000.00718.33
8.0.270.0070.00017.30
8.0.260.0030.00317.18
8.0.250.0030.00317.09
8.0.240.0040.00417.02
8.0.230.0030.00316.98
8.0.220.0030.00317.06
8.0.210.0000.00717.11
8.0.200.0000.00717.13
8.0.190.0040.00417.08
8.0.180.0070.00016.98
8.0.170.0060.00316.97
8.0.160.0000.00717.15
8.0.150.0040.00416.98
8.0.140.0000.00917.04
8.0.130.0060.00013.45
8.0.120.0030.00617.02
8.0.110.0040.00417.20
8.0.100.0000.00917.16
8.0.90.0030.00517.20
8.0.80.0040.01217.05
8.0.70.0000.00817.02
8.0.60.0000.00717.04
8.0.50.0040.00417.01
8.0.30.0110.01017.11
8.0.20.0120.00817.40
8.0.10.0000.00717.15
8.0.00.0060.01217.08
7.4.330.0000.00515.13
7.4.320.0040.00416.82
7.4.300.0000.00616.82
7.4.290.0020.00516.76
7.4.280.0040.00416.91
7.4.270.0030.00316.86
7.4.260.0070.00016.65
7.4.250.0000.00816.70
7.4.240.0000.00716.86
7.4.230.0070.00016.65
7.4.220.0130.01316.79
7.4.210.0070.01016.74
7.4.200.0080.00016.82
7.4.190.0000.00816.82
7.4.160.0170.00016.88
7.4.150.0150.00317.40
7.4.140.0130.00517.86
7.4.130.0160.02116.72
7.4.120.0100.00916.67
7.4.110.0120.00816.70
7.4.100.0090.00916.64
7.4.90.0120.00816.70
7.4.80.0090.01219.39
7.4.70.0170.00616.78
7.4.60.0130.00616.77
7.4.50.0040.00416.86
7.4.40.0110.00616.61
7.4.30.0100.00616.58
7.4.00.0000.01514.86
7.3.330.0000.00513.20
7.3.320.0050.00013.07
7.3.310.0080.00016.46
7.3.300.0020.00516.23
7.3.290.0110.00316.38
7.3.280.0070.01116.38
7.3.270.0070.01117.40
7.3.260.0160.00316.41
7.3.250.0160.00616.41
7.3.240.0130.01316.35
7.3.230.0080.00816.64
7.3.210.0120.00616.35
7.3.200.0160.00319.39
7.3.190.0140.00616.56
7.3.180.0080.01116.39
7.3.170.0140.00416.60
7.3.160.0100.00616.26
7.3.120.0000.01514.68
7.2.330.0150.00416.63
7.2.320.0050.01316.70
7.2.310.0130.00616.57
7.2.300.0100.00716.52
7.2.290.0160.00816.73
7.2.00.0040.01419.47
7.1.100.0030.01318.21
7.1.70.0000.01017.34
7.1.60.0070.01419.46
7.1.50.0070.01517.22
7.1.00.0070.07322.46
7.0.200.0030.00916.83
7.0.140.0030.07321.98
7.0.60.0100.08319.93
7.0.50.0170.06717.87
7.0.40.0030.07720.22
7.0.30.0330.03320.17
7.0.20.0200.07320.14
7.0.10.0100.05720.04
7.0.00.0070.08720.11
5.6.280.0070.07021.10
5.6.210.0170.08020.63
5.6.200.0070.04718.23
5.6.190.0070.09320.35
5.6.180.0030.04020.45
5.6.170.0400.04720.38
5.6.160.0100.04320.46
5.6.150.0030.04018.21
5.6.140.0070.08018.18
5.6.130.0100.08318.16
5.6.120.0100.07720.95
5.6.110.0130.08321.11
5.6.100.0070.08321.13
5.6.90.0070.07321.13
5.6.80.0100.03020.50
5.5.350.0070.08320.40
5.5.340.0130.07018.02
5.5.330.0100.08020.23
5.5.320.0030.04320.34
5.5.310.0270.07720.26
5.5.300.0130.06317.94
5.5.290.0070.08017.97
5.5.280.0100.06720.87
5.5.270.0070.08320.86
5.5.260.0130.08720.72
5.5.250.0030.04320.63
5.5.240.0070.03320.15
5.4.450.0330.04319.46
5.4.440.0330.04019.41
5.4.430.0230.05719.50
5.4.420.0130.05319.64
5.4.410.0100.06019.30
5.4.400.0830.05719.18
5.4.390.0830.05019.25
5.4.380.0170.06318.78
5.4.370.0300.06018.77
5.4.360.0200.05018.70
5.4.350.0070.05718.61
5.4.340.0170.05318.46
5.4.320.0060.03912.45
5.4.310.0040.03912.45
5.4.300.0080.03612.45
5.4.290.0060.04012.45
5.4.280.0080.03512.35
5.4.270.0060.03712.35
5.4.260.0050.03812.35
5.4.250.0040.04012.35
5.4.240.0060.04112.35
5.4.230.0060.04012.34
5.4.220.0050.03812.34
5.4.210.0090.03312.34
5.4.200.0130.04712.34
5.4.190.0030.05112.34
5.4.180.0070.04812.34
5.4.170.0110.04812.35
5.4.160.0130.05612.34
5.4.150.0100.04712.34
5.4.140.0070.05312.02
5.4.130.0070.04912.01
5.4.120.0070.04011.96
5.4.110.0100.03811.96
5.4.100.0040.04211.96
5.4.90.0080.04611.96
5.4.80.0100.03711.96
5.4.70.0050.04311.96
5.4.60.0090.03711.96
5.4.50.0090.04011.96
5.4.40.0070.04611.95
5.4.30.0090.04911.95
5.4.20.0110.05111.95
5.4.10.0080.05211.95
5.4.00.0060.05111.43
5.3.290.0100.03512.80
5.3.280.0080.05212.71
5.3.270.0120.05012.73
5.3.260.0080.05012.72
5.3.250.0070.05112.72
5.3.240.0090.04712.72
5.3.230.0100.05212.70
5.3.220.0130.05612.68
5.3.210.0150.05112.68
5.3.200.0100.05212.68
5.3.190.0080.05012.68
5.3.180.0110.05212.67
5.3.170.0140.04812.67
5.3.160.0110.04912.68
5.3.150.0110.04912.68
5.3.140.0110.04712.66
5.3.130.0080.06412.66
5.3.120.0080.05012.66
5.3.110.0100.04512.66
5.3.100.0090.05112.12
5.3.90.0090.04912.08
5.3.80.0110.04412.07
5.3.70.0080.05312.07
5.3.60.0110.04912.07
5.3.50.0090.04812.00
5.3.40.0100.04812.00
5.3.30.0090.05011.96
5.3.20.0110.04511.73
5.3.10.0060.05111.70
5.3.00.0130.04611.69
5.2.170.0070.0429.19
5.2.160.0070.0429.19
5.2.150.0100.0379.19
5.2.140.0050.0409.18
5.2.130.0080.0429.15
5.2.120.0050.0449.15
5.2.110.0040.0419.15
5.2.100.0060.0409.15
5.2.90.0090.0409.15
5.2.80.0040.0509.14
5.2.70.0070.0309.15
5.2.60.0030.0379.10
5.2.50.0060.0339.06
5.2.40.0070.0309.05
5.2.30.0040.0319.03
5.2.20.0040.0339.06
5.2.10.0080.0378.96
5.2.00.0110.0288.82
5.1.60.0040.0328.13
5.1.50.0010.0288.13
5.1.40.0040.0258.11
5.1.30.0050.0268.46
5.1.20.0070.0258.48
5.1.10.0050.0268.21
5.1.00.0060.0288.21
5.0.50.0050.0206.68
5.0.40.0030.0206.55
5.0.30.0090.0306.36
5.0.20.0040.0226.33
5.0.10.0020.0236.31
5.0.00.0040.0306.30
4.4.90.0020.0174.78
4.4.80.0000.0214.75
4.4.70.0020.0204.75
4.4.60.0030.0184.76
4.4.50.0040.0154.77
4.4.40.0040.0314.71
4.4.30.0030.0224.76
4.4.20.0060.0144.84
4.4.10.0040.0174.85
4.4.00.0060.0244.76
4.3.110.0050.0184.67
4.3.100.0040.0194.66
4.3.90.0040.0154.64
4.3.80.0050.0244.59
4.3.70.0030.0214.63
4.3.60.0080.0184.63
4.3.50.0010.0204.63
4.3.40.0020.0364.54
4.3.30.0030.0163.35
4.3.20.0060.0193.33
4.3.10.0030.0213.22
4.3.00.0000.02011.59

preferences:
46.53 ms | 401 KiB | 5 Q