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.0040.01416.50
8.3.50.0080.01022.15
8.3.40.0070.00719.06
8.3.30.0040.01118.96
8.3.20.0040.00420.33
8.3.10.0040.00423.50
8.3.00.0030.00519.19
8.2.180.0150.00018.54
8.2.170.0070.00722.96
8.2.160.0100.00320.47
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0040.00420.95
8.2.110.0090.00022.38
8.2.100.0030.00917.91
8.2.90.0050.00319.06
8.2.80.0030.00517.97
8.2.70.0000.00817.72
8.2.60.0000.00817.93
8.2.50.0080.00018.07
8.2.40.0040.00420.01
8.2.30.0040.00418.29
8.2.20.0080.00017.91
8.2.10.0040.00418.09
8.2.00.0040.00417.87
8.1.280.0110.00425.92
8.1.270.0040.00424.01
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0060.00323.70
8.1.230.0040.00718.98
8.1.220.0000.00817.74
8.1.210.0080.00018.77
8.1.200.0090.00017.35
8.1.190.0040.00417.35
8.1.180.0040.00419.10
8.1.170.0080.00018.65
8.1.160.0070.00021.87
8.1.150.0040.00418.76
8.1.140.0050.00317.53
8.1.130.0000.00717.93
8.1.120.0000.00717.59
8.1.110.0040.00417.62
8.1.100.0040.00417.56
8.1.90.0070.00017.60
8.1.80.0000.00717.64
8.1.70.0000.00717.49
8.1.60.0040.00417.72
8.1.50.0080.00017.45
8.1.40.0050.00317.58
8.1.30.0000.00817.72
8.1.20.0030.00617.74
8.1.10.0000.00817.69
8.1.00.0040.00417.69
8.0.300.0040.00418.77
8.0.290.0000.00717.30
8.0.280.0070.00018.30
8.0.270.0040.00417.23
8.0.260.0060.00017.11
8.0.250.0000.00717.12
8.0.240.0030.00617.10
8.0.230.0030.00517.15
8.0.220.0030.00317.13
8.0.210.0000.00717.02
8.0.200.0030.00317.17
8.0.190.0000.00717.02
8.0.180.0040.00417.10
8.0.170.0080.00017.11
8.0.160.0000.00716.93
8.0.150.0040.00416.99
8.0.140.0000.00816.91
8.0.130.0040.00413.54
8.0.120.0040.00416.95
8.0.110.0000.00717.16
8.0.100.0030.00716.94
8.0.90.0070.00017.09
8.0.80.0060.00917.06
8.0.70.0040.00417.07
8.0.60.0000.00716.98
8.0.50.0080.00016.95
8.0.30.0110.00817.27
8.0.20.0130.00717.44
8.0.10.0040.00417.18
8.0.00.0060.01216.96
7.4.330.0050.00015.04
7.4.320.0000.00616.84
7.4.300.0000.00716.73
7.4.290.0080.00016.75
7.4.280.0000.00716.85
7.4.270.0070.00016.67
7.4.260.0070.00016.70
7.4.250.0040.00416.85
7.4.240.0030.00416.85
7.4.230.0000.00716.81
7.4.220.0160.01016.78
7.4.210.0080.01116.87
7.4.200.0030.00316.54
7.4.190.0000.00816.84
7.4.160.0140.00316.47
7.4.150.0070.01317.40
7.4.140.0120.00717.86
7.4.130.0150.01916.80
7.4.120.0070.01016.65
7.4.110.0180.00316.77
7.4.100.0100.01316.63
7.4.90.0120.00616.53
7.4.80.0170.00319.39
7.4.70.0070.01616.71
7.4.60.0030.01716.86
7.4.50.0050.00016.59
7.4.40.0080.00816.67
7.4.30.0130.00316.55
7.4.10.0030.01415.36
7.4.00.0120.00615.04
7.3.330.0000.00513.26
7.3.320.0060.00013.27
7.3.310.0070.00016.24
7.3.300.0000.00716.19
7.3.290.0040.01116.36
7.3.280.0080.01216.36
7.3.270.0140.00317.40
7.3.260.0060.01316.65
7.3.250.0140.00616.66
7.3.240.0070.01716.55
7.3.230.0060.01016.39
7.3.210.0110.00816.62
7.3.200.0100.01319.39
7.3.190.0120.00616.61
7.3.180.0090.00916.28
7.3.170.0060.01116.48
7.3.160.0100.01016.68
7.3.130.0110.00714.69
7.3.120.0070.01014.72
7.3.110.0020.01714.89
7.3.100.0030.00914.93
7.3.90.0030.01314.65
7.3.80.0080.00915.05
7.3.70.0050.00614.89
7.3.60.0060.00914.82
7.3.50.0100.00714.97
7.3.40.0060.00814.90
7.3.30.0070.00714.85
7.3.20.0060.00416.57
7.3.10.0070.00516.86
7.3.00.0060.00916.69
7.2.330.0150.00416.73
7.2.320.0060.01216.69
7.2.310.0140.00716.54
7.2.300.0030.01316.56
7.2.290.0110.00716.70
7.2.260.0030.00915.14
7.2.250.0150.00415.06
7.2.240.0080.01015.09
7.2.230.0030.01115.10
7.2.220.0070.00915.06
7.2.210.0100.00815.00
7.2.200.0080.01115.05
7.2.190.0070.01014.98
7.2.180.0080.00615.00
7.2.170.0030.01214.98
7.2.160.0070.00615.14
7.2.150.0020.01216.97
7.2.140.0020.01016.99
7.2.130.0050.00916.95
7.2.120.0050.01016.77
7.2.110.0060.00816.91
7.2.100.0070.00816.88
7.2.90.0070.00616.97
7.2.80.0090.00716.98
7.2.70.0060.00716.95
7.2.60.0050.00916.79
7.2.50.0070.00816.87
7.2.40.0020.01116.89
7.2.30.0080.00616.97
7.2.20.0090.00616.78
7.2.10.0040.01216.98
7.2.00.0050.00916.72
7.1.330.0080.00615.88
7.1.320.0080.00716.03
7.1.310.0020.01215.91
7.1.300.0060.00815.68
7.1.290.0090.00615.88
7.1.280.0050.00915.83
7.1.270.0060.01015.75
7.1.260.0060.00615.75
7.1.250.0120.00315.71
7.1.240.0060.00415.70
7.1.230.0080.00615.72
7.1.220.0030.00815.83
7.1.210.0090.00615.77
7.1.200.0080.00715.89
7.1.190.0050.00815.62
7.1.180.0070.00716.03
7.1.170.0030.00915.88
7.1.160.0040.00915.87
7.1.150.0050.00915.87
7.1.140.0080.00315.95
7.1.130.0080.00315.68
7.1.120.0030.01015.75
7.1.110.0060.00815.74
7.1.100.0030.00816.64
7.1.90.0030.00715.80
7.1.80.0050.00615.81
7.1.70.0070.00416.33
7.1.60.0090.00817.03
7.1.50.0060.00916.29
7.1.40.0060.00715.97
7.1.30.0020.00815.85
7.1.20.0050.00815.72
7.1.10.0060.00615.70
7.1.00.0060.02718.16
7.0.330.0030.01015.34
7.0.320.0040.00615.58
7.0.310.0050.00815.54
7.0.300.0080.00615.29
7.0.290.0070.00415.60
7.0.280.0070.00815.35
7.0.270.0070.00215.46
7.0.260.0000.01415.42
7.0.250.0020.00815.51
7.0.240.0040.00915.57
7.0.230.0070.00515.58
7.0.220.0090.00215.39
7.0.210.0040.00815.57
7.0.200.0070.00515.90
7.0.190.0030.00815.19
7.0.180.0020.01215.47
7.0.170.0060.00515.35
7.0.160.0000.01215.55
7.0.150.0000.01715.55
7.0.140.0050.02917.56
7.0.130.0020.01215.38
7.0.120.0080.00515.49
7.0.110.0030.01015.47
7.0.100.0070.02017.05
7.0.90.0060.02416.90
7.0.80.0050.03017.04
7.0.70.0100.02716.99
7.0.60.0030.02017.03
7.0.50.0060.03317.21
7.0.40.0050.03015.70
7.0.30.0050.02615.62
7.0.20.0080.02815.64
7.0.10.0080.03015.69
7.0.00.0090.02915.62
5.6.400.0030.00914.11
5.6.390.0070.01114.33
5.6.380.0080.00814.15
5.6.370.0070.00714.18
5.6.360.0060.00514.13
5.6.350.0060.00714.22
5.6.340.0040.01114.19
5.6.330.0060.00614.51
5.6.320.0020.01214.26
5.6.310.0030.00614.45
5.6.300.0050.00714.25
5.6.290.0030.00814.28
5.6.280.0070.02716.68
5.6.270.0020.00914.24
5.6.260.0030.00514.34
5.6.250.0070.03016.28
5.6.240.0080.02716.24
5.6.230.0090.01716.31
5.6.220.0080.01616.28
5.6.210.0020.02616.32
5.6.200.0060.02716.51
5.6.190.0080.03216.61
5.6.180.0080.02716.34
5.6.170.0060.03216.43
5.6.160.0050.02316.57
5.6.150.0040.03416.43
5.6.140.0010.03716.44
5.6.130.0050.02616.45
5.6.120.0040.03316.47
5.6.110.0050.02216.63
5.6.100.0090.02816.31
5.6.90.0070.02916.45
5.6.80.0020.02316.23
5.6.70.0090.02916.15
5.6.60.0100.02916.33
5.6.50.0090.02316.13
5.6.40.0090.01816.19
5.6.30.0050.03216.39
5.6.20.0050.03016.18
5.6.10.0070.02616.32
5.6.00.0070.02616.27
5.5.380.0060.03215.14
5.5.370.0060.01515.11
5.5.360.0060.03115.14
5.5.350.0030.03215.26
5.5.340.0090.02815.28
5.5.330.0070.02315.41
5.5.320.0050.03215.32
5.5.310.0070.02015.41
5.5.300.0030.03315.29
5.5.290.0040.03315.29
5.5.280.0090.01815.38
5.5.270.0050.02815.37
5.5.260.0100.01715.26
5.5.250.0090.02815.10
5.5.240.0040.03615.05
5.5.230.0110.02415.07
5.5.220.0080.02715.01
5.5.210.0060.02914.94
5.5.200.0040.02815.00
5.5.190.0070.02515.02
5.5.180.0050.03414.97
5.5.170.0050.00712.58
5.5.160.0060.02414.98
5.5.150.0100.02514.94
5.5.140.0020.02114.94
5.5.130.0030.02114.91
5.5.120.0040.03014.95
5.5.110.0060.02414.99
5.5.100.0070.03315.08
5.5.90.0080.02314.94
5.5.80.0040.03214.93
5.5.70.0040.02114.98
5.5.60.0020.02315.09
5.5.50.0050.02914.90
5.5.40.0090.02615.02
5.5.30.0070.02414.86
5.5.20.0050.03114.95
5.5.10.0040.02214.91
5.5.00.0040.02915.06
5.4.450.0030.03114.34
5.4.440.0040.03214.49
5.4.430.0060.02714.53
5.4.420.0030.03214.43
5.4.410.0020.03014.37
5.4.400.0030.03214.32
5.4.390.0050.02314.29
5.4.380.0050.03014.30
5.4.370.0070.02414.33
5.4.360.0080.03014.26
5.4.350.0020.02014.35
5.4.340.0070.02514.19
5.4.330.0020.00712.00
5.4.320.0060.01714.28
5.4.310.0040.01914.18
5.4.300.0060.02614.32
5.4.290.0040.03214.35
5.4.280.0020.03114.32
5.4.270.0050.02914.24
5.4.260.0030.02414.29
5.4.250.0040.02614.29
5.4.240.0090.02314.31
5.4.230.0060.01714.22
5.4.220.0050.02514.22
5.4.210.0040.02914.19
5.4.200.0060.02114.24
5.4.190.0070.02414.24
5.4.180.0090.02614.36
5.4.170.0030.01914.28
5.4.160.0070.02214.33
5.4.150.0070.02714.43
5.4.140.0040.02613.27
5.4.130.0050.02413.50
5.4.120.0040.02713.33
5.4.110.0040.03013.33
5.4.100.0050.02413.41
5.4.90.0060.02613.51
5.4.80.0070.01413.41
5.4.70.0030.02813.40
5.4.60.0080.01413.31
5.4.50.0060.01613.47
5.4.40.0040.03013.40
5.4.30.0040.02113.39
5.4.20.0070.01413.42
5.4.10.0010.03413.42
5.4.00.0020.02013.15
5.3.290.0090.02612.74
5.3.280.0030.02712.68
5.3.270.0020.02712.69
5.3.260.0020.03112.59
5.3.250.0020.01712.71
5.3.240.0030.02312.61
5.3.230.0040.03112.67
5.3.220.0060.02412.63
5.3.210.0080.02712.63
5.3.200.0090.02512.68
5.3.190.0060.02812.70
5.3.180.0020.02112.71
5.3.170.0020.02012.70
5.3.160.0030.02512.70
5.3.150.0040.02412.67
5.3.140.0010.01912.61
5.3.130.0050.02812.67
5.3.120.0040.02512.63
5.3.110.0070.02812.71
5.3.100.0070.02312.50
5.3.90.0050.02812.41
5.3.80.0040.03112.45
5.3.70.0070.02612.43
5.3.60.0100.01612.40
5.3.50.0050.01612.42
5.3.40.0060.02012.41
5.3.30.0070.02712.39
5.3.20.0070.02212.34
5.3.10.0060.02712.25
5.3.00.0050.02612.28
5.2.170.0070.02710.62
5.2.160.0070.03010.71
5.2.150.0020.02310.68
5.2.140.0020.02310.69
5.2.130.0070.02810.70
5.2.120.0070.01710.67
5.2.110.0000.03210.59
5.2.100.0030.03310.59
5.2.90.0030.03510.68
5.2.80.0070.01510.68
5.2.70.0030.04310.68
5.2.60.0050.03210.64
5.2.50.0020.02010.64
5.2.40.0090.02610.54
5.2.30.0070.03010.54
5.2.20.0030.02710.67
5.2.10.0020.01810.57
5.2.00.0020.02810.52
5.1.60.0030.02810.18
5.1.50.0030.01510.07
5.1.40.0030.02810.18
5.1.30.0000.03110.28
5.1.20.0050.02010.37
5.1.10.0050.02810.21
5.1.00.0050.02510.21
5.0.50.0030.0209.44
5.0.40.0030.0239.38
5.0.30.0020.0279.34
5.0.20.0030.0209.34
5.0.10.0020.0209.34
5.0.00.0050.0329.34
4.4.90.0000.0209.34
4.4.80.0020.0189.34
4.4.70.0030.0179.34
4.4.60.0050.0159.34
4.4.50.0090.0179.34
4.4.40.0030.0209.34
4.4.30.0000.0209.34
4.4.20.0020.0109.34
4.4.10.0050.0109.34
4.4.00.0020.0279.34
4.3.110.0020.0209.34
4.3.100.0010.0219.34
4.3.90.0000.0229.34
4.3.80.0030.0279.34
4.3.70.0020.0209.34
4.3.60.0050.0189.34
4.3.50.0090.0109.34
4.3.40.0090.0219.34
4.3.30.0020.0209.34
4.3.20.0000.0219.34
4.3.10.0000.0159.34
4.3.00.0000.0179.34

preferences:
52.79 ms | 400 KiB | 5 Q