3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = '<html> <body> <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0> <TR> <TD BGCOLOR=000000> <table> <td>Name</td> <td>Date</td> </tr> <tr> <td>Chad</td> <td>10/23/1996</td> </tr> <tr> <td>Rebecca</td> <td>05/03/2001</td> </table> </body> </html>'; $dom = new DOMDocument(); $dom->loadHTML($html); // Grab first table from dom and store its rows and columns by tag name. $rows = $dom->getElementsByTagName('table')->item(1)->getElementsByTagName('tr'); $headers = $rows->item(0); $resultArray = []; $keys = []; foreach($headers as $header) { $keys[] = strtolower($cell->nodeValue); } foreach($rows as $row) { $item = []; foreach($keys as $i=>$key) { $cells = $row->getElementsByTagName('td'); $item[$key] = $cells->item($i)->nodeValue; } $resultArray[] = $item; } print_r($resultArray);

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.0140.00318.93
8.3.50.0070.01418.28
8.3.40.0040.01119.09
8.3.30.0060.00919.20
8.3.20.0080.00019.63
8.3.10.0040.00422.07
8.3.00.0040.00420.92
8.2.180.0110.00418.80
8.2.170.0150.00022.96
8.2.160.0120.00619.57
8.2.150.0030.00524.18
8.2.140.0000.00824.66
8.2.130.0040.00418.16
8.2.120.0000.00826.35
8.2.110.0030.00619.62
8.2.100.0070.00418.09
8.2.90.0040.00418.13
8.2.80.0000.01019.40
8.2.70.0040.00418.16
8.2.60.0040.00418.59
8.2.50.0060.00318.10
8.2.40.0030.00619.61
8.2.30.0040.00419.59
8.2.20.0000.00918.30
8.2.10.0040.00418.24
8.2.00.0090.00018.10
8.1.280.0100.00725.92
8.1.270.0060.00319.29
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0070.00422.76
8.1.230.0110.00022.24
8.1.220.0060.00317.91
8.1.210.0030.00518.77
8.1.200.0000.01017.60
8.1.190.0000.00817.48
8.1.180.0040.00418.10
8.1.170.0080.00018.71
8.1.160.0000.00719.03
8.1.150.0050.00319.21
8.1.140.0000.00722.31
8.1.130.0000.01120.41
8.1.120.0000.00817.73
8.1.110.0040.00417.66
8.1.100.0040.00417.52
8.1.90.0080.00017.68
8.1.80.0000.00817.70
8.1.70.0000.00817.71
8.1.60.0040.00417.83
8.1.50.0080.00017.67
8.1.40.0040.00417.77
8.1.30.0080.00017.92
8.1.20.0000.00817.76
8.1.10.0060.00517.65
8.1.00.0000.00817.73
8.0.300.0000.00818.77
8.0.290.0040.00417.00
8.0.280.0000.00818.54
8.0.270.0000.00817.58
8.0.260.0000.00618.64
8.0.250.0000.00717.22
8.0.240.0050.00217.21
8.0.230.0040.00417.24
8.0.220.0000.00717.02
8.0.210.0000.00717.08
8.0.200.0000.00717.24
8.0.190.0040.00417.21
8.0.180.0040.00417.19
8.0.170.0000.00917.17
8.0.160.0040.00417.07
8.0.150.0040.00417.13
8.0.140.0040.00417.01
8.0.130.0000.00613.65
8.0.120.0050.00317.09
8.0.110.0050.00217.08
8.0.100.0030.00517.14
8.0.90.0040.00417.12
8.0.80.0060.01217.22
8.0.70.0040.00417.16
8.0.60.0050.00217.24
8.0.50.0000.00717.19
8.0.30.0100.00817.37
8.0.20.0150.00817.44
8.0.10.0080.00017.29
8.0.00.0130.00816.87
7.4.330.0050.00015.55
7.4.320.0040.00416.59
7.4.300.0030.00316.84
7.4.290.0000.00716.75
7.4.280.0000.01016.72
7.4.270.0000.00716.79
7.4.260.0030.00316.70
7.4.250.0040.00416.66
7.4.240.0070.00016.86
7.4.230.0000.00816.97
7.4.220.0040.00416.82
7.4.210.0110.01016.87
7.4.200.0030.00316.82
7.4.160.0080.01116.89
7.4.140.0100.00917.86
7.4.130.0170.00016.71
7.4.120.0100.00816.77
7.4.110.0030.01916.53
7.4.100.0150.00316.86
7.4.90.0130.01016.53
7.4.80.0130.01019.39
7.4.70.0110.00616.82
7.4.60.0130.00316.67
7.4.50.0070.01116.43
7.4.40.0140.00916.73
7.4.00.0060.00915.13
7.3.330.0020.00213.27
7.3.320.0030.00313.36
7.3.310.0050.00516.53
7.3.300.0000.00716.50
7.3.290.0020.00516.50
7.3.280.0090.00816.53
7.3.260.0120.00916.64
7.3.240.0100.00916.60
7.3.230.0120.00616.55
7.3.210.0060.01316.52
7.3.200.0170.00016.65
7.3.190.0190.00316.70
7.3.180.0130.00616.61
7.3.170.0150.00616.53
7.3.160.0140.00916.72
7.2.330.0120.01316.81
7.2.320.0090.00916.87
7.2.310.0070.01016.91
7.2.300.0130.00316.95
7.2.290.0120.00517.01
7.2.110.0090.00616.87
7.2.100.0090.00916.50
7.2.90.0080.00816.54
7.2.80.0000.01416.64
7.2.70.0080.00916.80
7.2.60.0030.01316.79
7.2.50.0000.01316.95
7.2.40.0030.00917.07
7.2.30.0070.01016.52
7.2.20.0030.01216.77
7.2.10.0100.00616.52
7.2.00.0060.00916.70
7.1.230.0120.00315.78
7.1.220.0040.00715.91
7.1.210.0050.00815.80
7.1.200.0000.01515.82
7.1.190.0100.00315.77
7.1.180.0090.00615.91
7.1.170.0060.00615.79
7.1.160.0120.00315.63
7.1.150.0080.00315.35
7.1.140.0000.01415.75
7.1.130.0030.01215.90
7.1.120.0120.00315.31
7.1.110.0110.00415.83
7.1.100.0120.00315.75
7.1.90.0040.01215.61
7.1.80.0090.00315.78
7.1.70.0090.00615.84
7.1.60.0270.00333.81
7.1.50.0270.00633.54
7.1.40.0230.01033.48
7.1.30.0070.02533.34
7.1.20.0250.00333.80
7.1.10.0100.00315.67
7.1.00.0040.01115.81
5.6.380.0060.00914.63

preferences:
54.43 ms | 400 KiB | 5 Q