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> <tr> <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.0090.00917.13
8.3.50.0150.00318.45
8.3.40.0060.00919.20
8.3.30.0040.01118.87
8.3.20.0080.00019.53
8.3.10.0080.00021.82
8.3.00.0080.00020.83
8.2.180.0120.00618.79
8.2.170.0150.00422.96
8.2.160.0080.00821.18
8.2.150.0040.00424.18
8.2.140.0070.00324.66
8.2.130.0030.00518.28
8.2.120.0030.00626.35
8.2.110.0060.00319.26
8.2.100.0060.00618.16
8.2.90.0000.00818.00
8.2.80.0050.00317.97
8.2.70.0000.00818.16
8.2.60.0040.00418.41
8.2.50.0000.00818.10
8.2.40.0040.00419.55
8.2.30.0040.00419.52
8.2.20.0050.00218.45
8.2.10.0080.00018.28
8.2.00.0060.00317.98
8.1.280.0110.00425.92
8.1.270.0060.00319.15
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00622.70
8.1.230.0120.00022.46
8.1.220.0030.00518.04
8.1.210.0000.00818.77
8.1.200.0060.00317.61
8.1.190.0040.00417.48
8.1.180.0080.00018.10
8.1.170.0000.00818.76
8.1.160.0000.00719.02
8.1.150.0070.00019.15
8.1.140.0030.00522.33
8.1.130.0060.00320.25
8.1.120.0030.00517.66
8.1.110.0000.00717.67
8.1.100.0040.00317.64
8.1.90.0000.00817.71
8.1.80.0000.00917.70
8.1.70.0000.00817.64
8.1.60.0000.00717.73
8.1.50.0090.00017.72
8.1.40.0000.00817.81
8.1.30.0000.00817.76
8.1.20.0060.00317.92
8.1.10.0100.00017.75
8.1.00.0000.00817.66
8.0.300.0000.00718.77
8.0.290.0030.00617.00
8.0.280.0000.00718.62
8.0.270.0000.00717.49
8.0.260.0070.00018.55
8.0.250.0030.00317.09
8.0.240.0040.00417.23
8.0.230.0000.00717.16
8.0.220.0040.00417.09
8.0.210.0040.00417.04
8.0.200.0000.00717.10
8.0.190.0000.00717.11
8.0.180.0080.00017.04
8.0.170.0030.00617.10
8.0.160.0040.00417.07
8.0.150.0000.00816.97
8.0.140.0000.00816.94
8.0.130.0000.00513.46
8.0.120.0000.00816.99
8.0.110.0030.00617.12
8.0.100.0050.00216.96
8.0.90.0050.00316.88
8.0.80.0110.00517.15
8.0.70.0080.00017.02
8.0.60.0000.00816.92
8.0.50.0040.00416.82
8.0.30.0130.00617.29
8.0.20.0120.00917.51
8.0.10.0040.00417.11
8.0.00.0090.00917.04
7.4.330.0000.00615.55
7.4.320.0060.00016.82
7.4.300.0040.00416.72
7.4.290.0000.00816.83
7.4.280.0080.00316.71
7.4.270.0030.00316.80
7.4.260.0030.00316.65
7.4.250.0040.00416.64
7.4.240.0040.00416.61
7.4.230.0030.00316.71
7.4.220.0080.00016.96
7.4.210.0070.01016.87
7.4.200.0030.00316.86
7.4.160.0120.00716.75
7.4.140.0130.00917.86
7.4.130.0130.01016.84
7.4.120.0110.00716.78
7.4.110.0090.01416.53
7.4.100.0130.01016.63
7.4.90.0030.01316.75
7.4.80.0030.01319.39
7.4.70.0090.00616.55
7.4.60.0090.00616.59
7.4.50.0100.00716.52
7.4.40.0080.01216.79
7.4.00.0120.00315.09
7.3.330.0030.00313.22
7.3.320.0030.00313.25
7.3.310.0050.00516.34
7.3.300.0000.00716.43
7.3.290.0040.00516.46
7.3.280.0090.00616.44
7.3.260.0100.01116.59
7.3.240.0100.00816.59
7.3.230.0150.00616.57
7.3.210.0070.01016.44
7.3.200.0120.00416.50
7.3.190.0140.00316.50
7.3.180.0090.00916.73
7.3.170.0090.01316.72
7.3.160.0120.01416.71
7.3.120.0040.01114.92
7.3.110.0070.00714.75
7.3.100.0040.01414.71
7.3.90.0000.00914.92
7.3.80.0100.00714.83
7.3.70.0000.01614.79
7.3.60.0030.01414.72
7.3.50.0100.00714.70
7.3.40.0090.00614.84
7.3.30.0060.01014.96
7.3.20.0060.01016.79
7.3.10.0040.00716.49
7.3.00.0060.00616.75
7.2.330.0170.00816.71
7.2.320.0120.01616.84
7.2.310.0100.00716.69
7.2.300.0090.00916.61
7.2.290.0140.00517.09
7.2.240.0100.00615.09
7.2.230.0070.00715.37
7.2.220.0080.00815.19
7.2.210.0000.01415.17
7.2.200.0070.01015.31
7.2.190.0000.01215.11
7.2.180.0080.00315.35
7.2.170.0070.00714.96
7.2.160.0060.00615.15
7.2.150.0040.01217.06
7.2.140.0070.01016.77
7.2.130.0100.00616.89
7.2.120.0070.00717.03
7.2.110.0100.00716.75
7.2.100.0100.00716.87
7.2.90.0060.00716.64
7.2.80.0080.00816.75
7.2.70.0070.00816.88
7.2.60.0040.01116.89
7.2.50.0050.01217.05
7.2.40.0060.01117.06
7.2.30.0060.00817.01
7.2.20.0080.00716.82
7.2.10.0100.00616.83
7.2.00.0070.01016.80
7.1.330.0060.01015.82
7.1.320.0090.00315.70
7.1.310.0070.01015.63
7.1.300.0030.01015.88
7.1.290.0000.01515.84
7.1.280.0090.00615.54
7.1.270.0110.00315.82
7.1.260.0070.00716.05
7.1.250.0100.00615.70
7.1.230.0110.00315.77
7.1.220.0100.00315.88
7.1.210.0040.00915.66
7.1.200.0040.00815.83
7.1.190.0060.00715.64
7.1.180.0040.00815.45
7.1.170.0060.00915.69
7.1.160.0050.00815.54
7.1.150.0100.00315.59
7.1.140.0000.01315.50
7.1.130.0030.01015.77
7.1.120.0070.00715.75
7.1.110.0000.01215.80
7.1.100.0030.01015.87
7.1.90.0060.00915.66
7.1.80.0050.01015.66
7.1.70.0070.00715.60
7.1.60.0240.01333.36
7.1.50.0310.00633.25
7.1.40.0260.01033.52
7.1.30.0270.01033.24
7.1.20.0250.00733.57
7.1.10.0040.01115.73
7.1.00.0100.00715.73
5.6.380.0030.01314.66

preferences:
36.21 ms | 400 KiB | 5 Q