3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<HTML <table border="0" cellpadding="0" cellspacing="0" width="100%" class="Table2"> <tbody><tr> <td width="1%" valign="top" class="Title2">&nbsp;</td> <td width="65%" valign="top" class="Title2">Subject</td> <td width="1%" valign="top" class="Title2">&nbsp;</td> <td width="14%" valign="top" align="Center" class="Title2">Last Update</td> <td width="1%" valign="top" class="Title2">&nbsp;</td> <td width="8%" valign="top" align="Center" class="Title2">Replies</td> <td width="1%" valign="top" class="Title2">&nbsp;</td> <td width="9%" valign="top" align="Center" class="Title2">Views</td> </tr> <tr> <td width="1%" height="25">&nbsp;</td> <td width="64%" height="25" class="FootNotes2"><a href="/files/forum/2017/1/837110.php" target="_top" class="Links2">Serious dedicated study partner for U World</a> - step12013</td> <td width="1%" height="25">&nbsp;</td> <td width="14%" height="25" class="FootNotes2" align="center">02/11/17 01:50</td> <td width="1%" height="25">&nbsp;</td> <td width="8%" height="25" align="Center" class="FootNotes2">10</td> <td width="1%" height="25">&nbsp;</td> <td width="9%" height="25" align="Center" class="FootNotes2">318</td> </tr> <tr> <td width="1%" height="25">&nbsp;</td> <td width="64%" height="25" class="FootNotes2"><a href="/files/forum/2017/1/837999.php" target="_top" class="Links2">some text</a> - step12013</td> <td width="1%" height="25">&nbsp;</td> <td width="14%" height="25" class="FootNotes2" align="center">02/11/17 01:50</td> <td width="1%" height="25">&nbsp;</td> <td width="8%" height="25" align="Center" class="FootNotes2">10</td> <td width="1%" height="25">&nbsp;</td> <td width="9%" height="25" align="Center" class="FootNotes2">318</td> </tr> </tbody> </table> HTML; $dom=new DOMDocument; $dom->loadHTML($html); $xpath = new DOMXPath($dom); foreach ($xpath->evaluate("//td[@class = 'FootNotes2']/a") as $node) { // target a tags that have <td class="FootNotes2"> as parent $result[]=['href' => $node->getAttribute('href'), 'text' => $node->nodeValue]; // extract/store the href and text values if (sizeof($result) == 10) { break; } // set a limit of 10 rows of data } if (isset($result)) { echo "<ul>\n"; foreach ($result as $data) { echo "\t<li class=\"itemtitle\"><a href=\"{$data['href']}\" target=\"_blank\">{$data['text']}</a></li>\n"; } echo "</ul>"; }

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.5.10.0070.00218.74
8.5.00.0140.00820.15
8.4.150.0030.00014.05
8.4.140.0100.01217.94
8.4.130.0160.00518.00
8.4.120.0110.00820.68
8.4.110.0070.01022.90
8.4.100.0140.00418.14
8.4.90.0090.01419.08
8.4.80.0040.00618.03
8.4.70.0150.00818.38
8.4.60.0140.00819.33
8.4.50.0150.00718.02
8.4.40.0090.01218.05
8.4.30.0040.00420.04
8.4.20.0090.01219.77
8.4.10.0000.00919.78
8.3.280.0100.01118.65
8.3.270.0140.00717.21
8.3.260.0090.00916.96
8.3.250.0050.00419.43
8.3.240.0130.00716.84
8.3.230.0100.01017.04
8.3.220.0080.00517.68
8.3.210.0080.00617.04
8.3.200.0070.00317.09
8.3.190.0120.00917.25
8.3.180.0140.00419.33
8.3.170.0040.00417.04
8.3.160.0130.00617.44
8.3.150.0140.00317.63
8.3.140.0050.00321.13
8.3.130.0040.00418.84
8.3.120.0100.01019.13
8.3.110.0080.00420.94
8.3.100.0060.00924.06
8.3.90.0090.00026.77
8.3.80.0030.00618.81
8.3.70.0090.00918.93
8.3.60.0070.01118.67
8.3.50.0110.00817.77
8.3.40.0130.00319.13
8.3.30.0150.00618.95
8.3.20.0040.00422.32
8.3.10.0000.00823.73
8.3.00.0080.00024.03
8.2.290.0110.00920.59
8.2.280.0080.00718.95
8.2.270.0090.00918.57
8.2.260.0030.00717.01
8.2.250.0070.01118.82
8.2.240.0040.00417.68
8.2.230.0040.00422.58
8.2.220.0040.00437.54
8.2.210.0040.00426.77
8.2.200.0090.00018.91
8.2.190.0090.00616.75
8.2.180.0170.00316.88
8.2.170.0110.00722.96
8.2.160.0140.00319.82
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0030.00521.61
8.2.120.0080.00026.35
8.2.110.0100.00021.40
8.2.100.0060.00618.05
8.2.90.0040.00419.72
8.2.80.0060.00318.13
8.2.70.0050.00318.30
8.2.60.0080.00018.30
8.2.50.0050.00518.07
8.2.40.0030.00518.41
8.2.30.0000.00818.60
8.2.20.0000.00818.41
8.2.10.0000.00818.32
8.2.00.0000.00818.41
8.1.330.0100.01022.66
8.1.320.0060.00416.45
8.1.310.0080.00416.92
8.1.300.0040.00418.06
8.1.290.0080.00330.84
8.1.280.0070.01325.92
8.1.270.0070.01023.99
8.1.260.0060.00326.35
8.1.250.0050.00328.09
8.1.240.0040.00424.14
8.1.230.0030.00923.04
8.1.220.0030.00618.04
8.1.210.0050.00318.77
8.1.200.0050.00517.60
8.1.190.0030.00717.72
8.1.180.0000.00918.10
8.1.170.0040.00419.09
8.1.160.0040.00419.21
8.1.150.0030.00622.43
8.1.140.0050.00217.99
8.1.130.0000.00719.28
8.1.120.0000.00717.85
8.1.110.0080.00017.73
8.1.100.0000.00717.77
8.1.90.0000.00817.78
8.1.80.0030.00517.71
8.1.70.0000.00817.74
8.1.60.0000.01117.94
8.1.50.0040.00417.90
8.1.40.0040.00417.86
8.1.30.0030.00517.98
8.1.20.0040.00418.08
8.1.10.0000.00818.01
8.1.00.0020.00517.77
8.0.300.0040.00418.77
8.0.290.0050.00317.13
8.0.280.0030.00418.81
8.0.270.0070.00017.56
8.0.260.0030.00317.16
8.0.250.0070.00017.27
8.0.240.0080.00017.39
8.0.230.0040.00417.43
8.0.220.0000.00817.20
8.0.210.0040.00417.18
8.0.200.0040.00417.34
8.0.190.0000.00817.30
8.0.180.0040.00417.30
8.0.170.0090.00017.27
8.0.160.0000.01017.22
8.0.150.0040.00417.30
8.0.140.0000.00717.16
8.0.130.0060.00013.71
8.0.120.0030.00517.19
8.0.110.0040.00417.20
8.0.100.0040.00417.22
8.0.90.0000.00817.12
8.0.80.0030.01217.20
8.0.70.0000.00817.41
8.0.60.0040.00417.09
8.0.50.0040.00417.20
8.0.30.0110.00817.35
8.0.20.0090.01217.40
8.0.10.0040.00417.51
8.0.00.0080.01017.18
7.4.330.0020.00215.55
7.4.320.0040.00416.91
7.4.300.0000.00816.97
7.4.290.0040.00416.89
7.4.280.0000.00716.95
7.4.270.0000.00716.99
7.4.260.0050.00216.85
7.4.250.0040.00416.95
7.4.240.0040.00416.94
7.4.230.0000.00716.87
7.4.220.0040.00417.02
7.4.210.0110.00417.03
7.4.200.0040.00416.80
7.4.160.0070.01117.08
7.4.140.0110.00917.86
7.4.130.0140.00316.96
7.4.120.0080.01116.95
7.4.110.0140.00416.81
7.4.100.0100.00716.88
7.4.90.0150.00316.96
7.4.80.0060.01919.39
7.4.70.0100.01316.98
7.4.60.0100.00716.86
7.4.50.0150.00317.09
7.4.40.0060.01016.78
7.4.00.0150.00015.13
7.3.330.0030.00313.53
7.3.320.0030.00313.61
7.3.310.0000.00816.54
7.3.300.0040.00416.64
7.3.290.0030.00316.57
7.3.280.0090.00716.66
7.3.260.0110.01216.76
7.3.240.0110.00716.80
7.3.230.0070.01016.62
7.3.210.0060.01016.88
7.3.200.0110.01116.80
7.3.190.0090.00916.96
7.3.180.0060.01016.71
7.3.170.0110.00616.76
7.3.160.0130.00316.81
7.3.120.0130.00714.93
7.3.110.0060.01315.19
7.3.100.0110.00415.13
7.3.90.0060.01214.94
7.3.80.0000.01614.98
7.3.70.0120.00314.97
7.3.60.0090.00915.07
7.3.50.0000.01514.65
7.3.40.0060.00614.97
7.3.30.0100.00314.84
7.3.20.0060.00916.95
7.3.10.0000.01616.87
7.3.00.0030.01016.84
7.2.330.0100.00716.86
7.2.320.0040.01317.13
7.2.310.0160.00716.93
7.2.300.0130.00717.20
7.2.290.0090.01017.01
7.2.240.0070.01315.50
7.2.230.0030.01315.18
7.2.220.0120.00315.31
7.2.210.0110.00715.17
7.2.200.0070.01015.22
7.2.190.0030.01215.31
7.2.180.0070.01115.14
7.2.170.0030.01014.98
7.2.160.0030.01115.21
7.2.150.0070.01016.78
7.2.140.0080.00817.05
7.2.130.0000.01017.29
7.2.120.0040.00816.91
7.2.110.0040.01217.20
7.2.100.0030.01317.14
7.2.90.0040.01116.98
7.2.80.0060.00817.10
7.2.70.0060.00617.34
7.2.60.0060.00617.09
7.2.50.0040.00717.20
7.2.40.0030.01317.28
7.2.30.0050.01218.71
7.2.20.0100.00718.69
7.2.10.0060.01118.53
7.2.00.0070.00818.51
7.1.330.0070.01116.04
7.1.320.0070.01316.01
7.1.310.0110.00316.07
7.1.300.0040.01215.97
7.1.290.0040.00716.09
7.1.280.0030.00715.89
7.1.270.0070.00316.11
7.1.260.0030.00916.17
7.1.250.0090.00616.00
7.1.200.0140.00815.45
7.1.150.0110.00918.76
7.1.140.0070.01618.96
7.1.130.0060.01718.73
7.1.120.0060.01618.98
7.1.110.0080.01418.46
7.1.100.0090.01018.16
7.1.90.0060.01818.25
7.1.80.0050.01318.14
7.1.70.0070.01017.36
7.1.60.0220.01534.92
7.1.50.0240.01534.87
7.1.40.0270.01134.54
7.1.30.0240.01534.79
7.1.20.0230.01534.67
7.1.10.0050.01816.82
7.1.00.0080.00916.97

preferences:
113.76 ms | 403 KiB | 5 Q