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.70.0070.00718.55
8.3.60.0140.00316.75
8.3.50.0090.00521.99
8.3.40.0070.00718.84
8.3.30.0140.00018.92
8.3.20.0080.00020.34
8.3.10.0060.00323.44
8.3.00.0000.00818.86
8.2.180.0150.00018.41
8.2.170.0090.00622.96
8.2.160.0100.00320.35
8.2.150.0000.00924.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0030.00620.85
8.2.110.0070.00322.29
8.2.100.0030.00919.57
8.2.90.0000.00719.05
8.2.80.0090.00017.97
8.2.70.0030.00617.49
8.2.60.0040.00417.90
8.2.50.0060.00318.07
8.2.40.0030.00519.82
8.2.30.0050.00218.26
8.2.20.0060.00319.38
8.2.10.0000.00717.95
8.2.00.0040.00417.68
8.1.280.0070.00725.92
8.1.270.0000.00823.89
8.1.260.0040.00426.35
8.1.250.0030.00528.09
8.1.240.0090.00023.89
8.1.230.0070.00419.10
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0070.00317.23
8.1.190.0080.00017.23
8.1.180.0060.00318.89
8.1.170.0000.00818.26
8.1.160.0050.00221.88
8.1.150.0070.00018.50
8.1.140.0030.00617.39
8.1.130.0040.00417.83
8.1.120.0030.00517.48
8.1.110.0050.00317.43
8.1.100.0000.00717.39
8.1.90.0030.00517.42
8.1.80.0000.00717.31
8.1.70.0030.00317.29
8.1.60.0040.00417.44
8.1.50.0030.00517.38
8.1.40.0030.00517.48
8.1.30.0080.00017.57
8.1.20.0000.00817.48
8.1.10.0040.00417.46
8.1.00.0000.00817.54
8.0.300.0070.00018.77
8.0.290.0000.00716.93
8.0.280.0030.00318.46
8.0.270.0000.00717.27
8.0.260.0040.00417.12
8.0.250.0000.00717.00
8.0.240.0100.00016.96
8.0.230.0000.00716.86
8.0.220.0030.00316.86
8.0.210.0000.00716.93
8.0.200.0000.00716.99
8.0.190.0070.00016.88
8.0.180.0000.00716.94
8.0.170.0040.00416.87
8.0.160.0040.00416.89
8.0.150.0030.00516.91
8.0.140.0040.00416.85
8.0.130.0000.00713.29
8.0.120.0050.00316.86
8.0.110.0000.00716.82
8.0.100.0030.00616.80
8.0.90.0030.00317.00
8.0.80.0120.00816.96
8.0.70.0050.00216.79
8.0.60.0000.00716.91
8.0.50.0070.00016.96
8.0.30.0120.00617.09
8.0.20.0080.01417.40
8.0.10.0040.00416.91
8.0.00.0050.01116.66
7.4.330.0020.00215.00
7.4.320.0030.00316.51
7.4.300.0070.00016.57
7.4.290.0070.00016.62
7.4.280.0040.00416.51
7.4.270.0000.00716.61
7.4.260.0030.00316.52
7.4.250.0000.00716.48
7.4.240.0020.00516.52
7.4.230.0000.00716.57
7.4.220.0070.01016.73
7.4.210.0060.00916.56
7.4.200.0000.00716.55
7.4.190.0030.00516.58
7.4.160.0130.00716.46
7.4.150.0120.00617.40
7.4.140.0070.01017.86
7.4.130.0130.01016.62
7.4.120.0110.00616.40
7.4.110.0140.00316.55
7.4.100.0120.00616.43
7.4.90.0070.01016.42
7.4.80.0100.01019.39
7.4.70.0150.00616.46
7.4.60.0130.00616.49
7.4.50.0060.00316.25
7.4.40.0070.01416.50
7.4.30.0100.00616.63
7.4.00.0060.01215.04
7.3.330.0030.00313.16
7.3.320.0000.00613.08
7.3.310.0000.00716.17
7.3.300.0070.00016.28
7.3.290.0070.00616.22
7.3.280.0100.01016.25
7.3.270.0100.00717.40
7.3.260.0060.01216.40
7.3.250.0110.01216.50
7.3.240.0150.00816.25
7.3.230.0100.00716.39
7.3.210.0060.01016.44
7.3.200.0080.01519.39
7.3.190.0090.00916.32
7.3.180.0060.01016.21
7.3.170.0060.01016.27
7.3.160.0080.00816.67
7.3.120.0080.00914.82
7.3.110.0080.01114.91
7.3.100.0050.01214.85
7.3.90.0060.00914.69
7.3.80.0040.00914.74
7.3.70.0020.01314.79
7.3.60.0060.00714.79
7.3.50.0030.01014.77
7.3.40.0040.00614.67
7.3.30.0050.00814.79
7.3.20.0070.00716.54
7.3.10.0080.00816.52
7.3.00.0070.00516.63
7.2.330.0100.00716.46
7.2.320.0160.00616.34
7.2.310.0080.01116.67
7.2.300.0090.01116.56
7.2.290.0140.00316.37
7.2.250.0110.00614.99
7.2.240.0100.01014.97
7.2.230.0080.00814.93
7.2.220.0030.01014.99
7.2.210.0050.01214.70
7.2.200.0080.00814.85
7.2.190.0050.01014.75
7.2.180.0050.00914.86
7.2.170.0030.01114.95
7.2.160.0000.00914.92
7.2.150.0110.00816.91
7.2.140.0060.00916.78
7.2.130.0060.00616.91
7.2.120.0000.01416.89
7.2.110.0070.00716.71
7.2.100.0060.01016.48
7.2.90.0060.00616.76
7.2.80.0110.00316.76
7.2.70.0030.01516.55
7.2.60.0070.01016.53
7.2.50.0070.00716.87
7.2.40.0030.01316.83
7.2.30.0070.01116.69
7.2.20.0140.00316.59
7.2.10.0060.00316.86
7.2.00.0070.01017.88
7.1.330.0090.00615.77
7.1.320.0060.00715.72
7.1.310.0060.00715.75
7.1.300.0070.00715.77
7.1.290.0070.00615.69
7.1.280.0060.00715.80
7.1.270.0060.00615.74
7.1.260.0080.00715.62
7.1.250.0090.00315.56
7.1.240.0070.00715.68
7.1.230.0060.00615.63
7.1.220.0120.00315.68
7.1.210.0040.00715.56
7.1.200.0030.01315.70
7.1.190.0000.01215.91
7.1.180.0110.00315.52
7.1.170.0000.01115.88
7.1.160.0110.00415.54
7.1.150.0120.00415.44
7.1.140.0000.01315.54
7.1.130.0000.01615.56
7.1.120.0030.01215.80
7.1.110.0050.00515.84
7.1.100.0040.00817.04
7.1.90.0070.00715.89
7.1.80.0030.01015.68
7.1.70.0050.00516.51
7.1.60.0080.01117.58
7.1.50.0060.01016.32
7.1.40.0040.01415.77
7.1.30.0040.00815.82
7.1.20.0000.01115.72
7.1.10.0070.00715.78
7.1.00.0030.04519.09
7.0.330.0000.01014.98
7.0.320.0100.00315.61
7.0.310.0100.00315.33
7.0.300.0000.00915.35
7.0.290.0070.01015.40
7.0.280.0030.01015.07
7.0.270.0040.01115.26
7.0.260.0070.00715.18
7.0.250.0000.00815.34
7.0.240.0120.00015.50
7.0.230.0050.00515.38
7.0.220.0060.00815.29
7.0.210.0060.00615.31
7.0.200.0040.00516.13
7.0.190.0000.01115.54
7.0.180.0110.00715.47
7.0.170.0000.00815.44
7.0.160.0000.01115.29
7.0.150.0000.00815.07
7.0.140.0030.04018.71
7.0.130.0040.01115.14
7.0.120.0070.00715.44
7.0.110.0040.00415.52
7.0.100.0070.00715.31
7.0.90.0030.01515.49
7.0.80.0050.00515.46
7.0.70.0000.01115.21
7.0.60.0050.02417.76
7.0.50.0030.03116.63
7.0.40.0070.02316.79
7.0.30.0140.03916.85
7.0.20.0120.02516.80
7.0.10.0050.04516.79
7.0.00.0020.05016.73
5.6.400.0030.01314.33
5.6.390.0100.00714.37
5.6.380.0080.00614.06
5.6.370.0040.01114.07
5.6.360.0030.01013.91
5.6.350.0030.01413.92
5.6.340.0040.00714.26
5.6.330.0060.01314.26
5.6.320.0110.00314.26
5.6.310.0070.01014.26
5.6.300.0090.00614.33
5.6.290.0000.01314.18
5.6.280.0070.04017.60
5.6.270.0060.00614.13
5.6.260.0070.00714.25
5.6.250.0070.00714.44
5.6.240.0040.00714.22
5.6.230.0030.01014.21
5.6.220.0030.01314.37
5.6.210.0140.03517.43
5.6.200.0050.04216.17
5.6.190.0030.04017.26
5.6.180.0070.03617.37
5.6.170.0230.04017.33
5.6.160.0060.04817.34
5.6.150.0120.03816.33
5.6.140.0070.03316.21
5.6.130.0120.04016.14
5.6.120.0040.02917.54
5.6.110.0080.04117.55
5.6.100.0170.04017.59
5.6.90.0050.04717.65
5.6.80.0070.03717.39
5.6.70.0110.00414.16
5.6.60.0110.00014.07
5.6.50.0000.01314.11
5.6.40.0040.00414.11
5.6.30.0000.01214.30
5.6.20.0060.00614.11
5.6.10.0000.01314.11
5.6.00.0070.00314.11
5.5.380.0060.00914.03
5.5.370.0060.00914.05
5.5.360.0080.00814.34
5.5.350.0050.04017.24
5.5.340.0070.04415.94
5.5.330.0070.03817.09
5.5.320.0030.04617.06
5.5.310.0220.04017.33
5.5.300.0070.02916.03
5.5.290.0100.03316.04
5.5.280.0030.02817.57
5.5.270.0080.04117.41
5.5.260.0050.05217.39
5.5.250.0070.03717.34
5.5.240.0030.04517.17
5.5.230.0080.00514.27
5.5.220.0040.00413.96
5.5.210.0030.01014.24
5.5.200.0070.01014.19
5.5.190.0070.00714.29
5.5.180.0080.00413.98
5.5.170.0040.01114.28
5.5.160.0000.00914.19
5.5.150.0070.00714.11
5.5.140.0140.00014.04
5.5.130.0140.00014.27
5.5.120.0070.00614.14
5.5.110.0030.00613.93
5.5.100.0070.00714.21
5.5.90.0110.00413.81
5.5.80.0100.00314.18
5.5.70.0000.01614.35
5.5.60.0100.00314.05
5.5.50.0000.01714.28
5.5.40.0000.01013.69
5.5.30.0150.00414.02
5.5.20.0070.01014.41
5.5.10.0030.01213.89
5.5.00.0090.00014.13
5.4.450.0210.02616.06
5.4.440.0260.02415.98
5.4.430.0580.04316.02
5.4.420.0130.02816.17
5.4.410.0400.04016.14
5.4.400.0220.02716.08
5.4.390.0260.03315.99
5.4.380.0100.02815.79
5.4.370.0030.03615.79
5.4.360.0140.02715.82
5.4.350.0070.03215.78
5.4.340.0050.03215.79
5.4.330.0000.00912.87
5.4.320.0050.02112.66
5.4.310.0070.02012.66
5.4.300.0050.02212.66
5.4.290.0050.03012.66
5.4.280.0030.02512.61
5.4.270.0060.02412.61
5.4.260.0050.03112.61
5.4.250.0070.03112.61
5.4.240.0070.02912.61
5.4.230.0040.02812.60
5.4.220.0090.02012.60
5.4.210.0050.02212.60
5.4.200.0050.02112.60
5.4.190.0050.02112.60
5.4.180.0070.02012.60
5.4.170.0060.02112.61
5.4.160.0040.02212.61
5.4.150.0060.02312.60
5.4.140.0020.02412.45
5.4.130.0040.02012.44
5.4.120.0020.02312.42
5.4.110.0030.02612.41
5.4.100.0080.02612.42
5.4.90.0040.03212.42
5.4.80.0060.02912.42
5.4.70.0050.02512.41
5.4.60.0090.02012.41
5.4.50.0050.02312.42
5.4.40.0050.02312.41
5.4.30.0070.02512.41
5.4.20.0080.02212.41
5.4.10.0080.02712.41
5.4.00.0050.02612.15
5.3.290.0090.01912.83
5.3.280.0080.02912.79
5.3.270.0100.02312.79
5.3.260.0060.02412.79
5.3.250.0060.02112.79
5.3.240.0050.02212.79
5.3.230.0050.02312.79
5.3.220.0050.02312.77
5.3.210.0050.02312.78
5.3.200.0060.02212.77
5.3.190.0040.02812.77
5.3.180.0050.02512.77
5.3.170.0060.02612.77
5.3.160.0050.02612.77
5.3.150.0050.02412.77
5.3.140.0050.02512.76
5.3.130.0080.02212.76
5.3.120.0080.02912.76
5.3.110.0070.02712.76
5.3.100.0060.03012.49
5.3.90.0080.03712.47
5.3.80.0120.03612.47
5.3.70.0070.02412.47
5.3.60.0070.03012.46
5.3.50.0140.04112.43
5.3.40.0080.03112.43
5.3.30.0070.02112.41
5.3.20.0090.02512.30
5.3.10.0100.02412.28
5.3.00.0070.02912.28
5.2.170.0090.0489.19
5.2.160.0050.0519.20
5.2.150.0080.0399.19
5.2.140.0140.0509.19
5.2.130.0070.0439.15
5.2.120.0060.0419.15
5.2.110.0060.0409.15
5.2.100.0060.0419.15
5.2.90.0070.0299.15
5.2.80.0060.0469.14
5.2.70.0080.0389.15
5.2.60.0050.0389.10
5.2.50.0090.0279.06
5.2.40.0100.0309.04
5.2.30.0060.0309.02
5.2.20.0060.0309.05
5.2.10.0120.0488.96
5.2.00.0030.0348.82
5.1.60.0200.0428.13
5.1.50.0050.0288.13
5.1.40.0060.0328.11
5.1.30.0040.0318.46
5.1.20.0040.0328.48
5.1.10.0030.0308.21
5.1.00.0070.0288.21
5.0.50.0070.0196.69
5.0.40.0070.0226.55
5.0.30.0050.0416.36
5.0.20.0060.0196.32
5.0.10.0050.0206.31
5.0.00.0030.0356.30
4.4.90.0030.0184.77
4.4.80.0020.0194.76
4.4.70.0040.0164.75
4.4.60.0130.0354.75
4.4.50.0050.0144.77
4.4.40.0050.0304.70
4.4.30.0040.0164.76
4.4.20.0020.0244.84
4.4.10.0070.0254.85
4.4.00.0040.0254.76
4.3.110.0040.0164.67
4.3.100.0040.0164.66
4.3.90.0000.0194.63
4.3.80.0050.0324.59
4.3.70.0050.0214.63
4.3.60.0020.0204.63
4.3.50.0030.0244.63
4.3.40.0030.0274.54
4.3.30.0000.0223.35
4.3.20.0050.0193.33
4.3.10.0030.0163.21
4.3.00.0030.02011.59

preferences:
40.42 ms | 401 KiB | 5 Q