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 BORDER=0 CELLSPACING=1 CELLPADDING=4> <TR STYLE="font-weight: 700;" ALIGN=CENTER BGCOLOR=99CCFF> <td>Product</td> <td>Quantity</td> <td>Retail Price</td> <td>Total Retail Price</td> <td>UPC</td> </tr> <tr bgcolor="FFFFFF"> <td style="">Smith High-Water Chroma Pop+ Polar Chromic NXT Sunglasses, Black</td> <td style="text-align: right;">1</td> <td style="text-align: right;">$259.00</td> <td style="text-align: right;">$259.00</td> <td style=""></td> </tr> <tr bgcolor="FFFFFF"> <td style="">Guest 2613A Charge Pro Series Marine Battery Charger (12/24-Volt, 15-Amps 5/5/5, Triple Output)</td> <td style="text-align: right;">1</td> <td style="text-align: right;">$179.18</td> <td style="text-align: right;">$179.18</td> <td style=""></td> </tr> </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)->getElementsByTagName('td'); $resultArray = []; $keys = []; foreach($headers as $header) { $keys[] = strtolower($header->nodeValue); } print_r($keys); 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.0170.00316.48
8.3.50.0130.00718.24
8.3.40.0120.00319.04
8.3.30.0090.00618.92
8.3.20.0080.00019.41
8.3.10.0000.00821.85
8.3.00.0040.00420.81
8.2.180.0110.00418.42
8.2.170.0090.00622.96
8.2.160.0310.00019.04
8.2.150.0050.00224.18
8.2.140.0030.00724.66
8.2.130.0050.00318.41
8.2.120.0040.00426.35
8.2.110.0040.00719.55
8.2.100.0040.00818.09
8.2.90.0040.00418.13
8.2.80.0000.00817.97
8.2.70.0050.00518.05
8.2.60.0090.00018.59
8.2.50.0030.00618.10
8.2.40.0050.00319.42
8.2.30.0060.00319.62
8.2.20.0060.00318.35
8.2.10.0040.00418.30
8.2.00.0030.00617.88
8.1.280.0100.01025.92
8.1.270.0090.00019.14
8.1.260.0050.00326.35
8.1.250.0030.00528.09
8.1.240.0060.00322.67
8.1.230.0080.00322.50
8.1.220.0030.00617.92
8.1.210.0090.00018.77
8.1.200.0060.00317.73
8.1.190.0050.00317.38
8.1.180.0000.00818.10
8.1.170.0090.00018.69
8.1.160.0030.00619.20
8.1.150.0040.00419.20
8.1.140.0000.00722.47
8.1.130.0000.01120.40
8.1.120.0050.00217.82
8.1.110.0040.00417.70
8.1.100.0000.00817.75
8.1.90.0080.00017.71
8.1.80.0030.00517.71
8.1.70.0030.00517.75
8.1.60.0040.00417.74
8.1.50.0090.00017.71
8.1.40.0050.00317.82
8.1.30.0040.00417.93
8.1.20.0090.00017.86
8.1.10.0000.00917.93
8.1.00.0000.00917.71
8.0.300.0040.00418.77
8.0.290.0030.00517.13
8.0.280.0000.00718.73
8.0.270.0000.00717.48
8.0.260.0040.00418.70
8.0.250.0040.00417.17
8.0.240.0000.00717.18
8.0.230.0000.00917.20
8.0.220.0070.00317.16
8.0.210.0000.00717.05
8.0.200.0030.00317.30
8.0.190.0040.00417.24
8.0.180.0000.00817.18
8.0.170.0050.00317.15
8.0.160.0080.00017.23
8.0.150.0040.00417.12
8.0.140.0070.00017.13
8.0.130.0030.00313.59
8.0.120.0040.00417.13
8.0.110.0040.00417.17
8.0.100.0000.00817.14
8.0.90.0070.00017.04
8.0.80.0090.01317.14
8.0.70.0040.00416.99
8.0.60.0040.00417.31
8.0.50.0030.00517.27
8.0.30.0080.01017.49
8.0.20.0030.01917.44
8.0.10.0040.00417.32
8.0.00.0080.01217.17
7.4.330.0050.00015.55
7.4.320.0030.00316.88
7.4.300.0070.00016.77
7.4.290.0000.00716.81
7.4.280.0060.00316.86
7.4.270.0040.00416.90
7.4.260.0070.00016.65
7.4.250.0070.00016.72
7.4.240.0030.00416.80
7.4.230.0050.00216.97
7.4.220.0040.00416.88
7.4.210.0100.00616.84
7.4.200.0000.00716.77
7.4.160.0130.00516.84
7.4.140.0090.01217.86
7.4.130.0090.01216.68
7.4.120.0100.00816.84
7.4.110.0070.01417.05
7.4.100.0100.00716.98
7.4.90.0120.00616.82
7.4.80.0090.01219.39
7.4.70.0070.01716.90
7.4.60.0110.00716.80
7.4.50.0030.01316.72
7.4.40.0100.01416.89
7.4.10.0070.01215.06
7.4.00.0050.01215.06
7.3.330.0000.00613.45
7.3.320.0030.00313.47
7.3.310.0030.00616.43
7.3.300.0020.00516.55
7.3.290.0040.00416.62
7.3.280.0110.00316.59
7.3.260.0100.01016.69
7.3.240.0110.00816.68
7.3.230.0120.00616.77
7.3.210.0070.01016.69
7.3.200.0120.00616.84
7.3.190.0200.00316.63
7.3.180.0090.00616.88
7.3.170.0130.00916.83
7.3.160.0170.00616.52
7.3.130.0120.00515.08
7.3.120.0060.01215.15
7.3.110.0040.01314.78
7.3.100.0080.00515.08
7.3.90.0090.00614.93
7.3.80.0040.01115.02
7.3.70.0040.00814.98
7.3.60.0080.00615.04
7.3.50.0030.00914.91
7.3.40.0070.00614.93
7.3.30.0090.00514.93
7.3.20.0100.00416.56
7.3.10.0090.00416.79
7.3.00.0080.00816.87
7.2.330.0090.01916.90
7.2.320.0090.01216.74
7.2.310.0130.00316.74
7.2.300.0100.00616.74
7.2.290.0070.01416.91
7.2.260.0070.01015.24
7.2.250.0080.01015.10
7.2.240.0080.00815.10
7.2.230.0080.00815.23
7.2.220.0050.00815.29
7.2.210.0050.01115.20
7.2.200.0040.00815.13
7.2.190.0070.00915.13
7.2.180.0040.01015.22
7.2.170.0030.01115.09
7.2.160.0090.00615.09
7.2.150.0020.01017.07
7.2.140.0080.00717.04
7.2.130.0080.00617.01
7.2.120.0010.01317.02
7.2.110.0140.00916.46
7.2.100.0320.00816.96
7.2.90.0070.00716.84
7.2.80.0080.00616.84
7.2.70.0090.00616.88
7.2.60.0070.00616.90
7.2.50.0060.00916.82
7.2.40.0050.00917.03
7.2.30.0080.00817.02
7.2.20.0040.01017.02
7.2.10.0110.00517.00
7.2.00.0070.00816.98
7.1.330.0060.00916.01
7.1.320.0030.00915.84
7.1.310.0060.00815.99
7.1.300.0050.00915.87
7.1.290.0060.00415.94
7.1.280.0040.00616.05
7.1.270.0030.00715.88
7.1.260.0090.00615.88
7.1.250.0030.01115.90
7.1.240.0050.00815.99
7.1.230.0210.01115.19
7.1.220.0240.00715.30
7.1.210.0070.00415.84
7.1.200.0090.00615.81
7.1.190.0080.00815.81
7.1.180.0060.00615.81
7.1.170.0070.00615.70
7.1.160.0080.00615.70
7.1.150.0100.00415.66
7.1.140.0080.00715.83
7.1.130.0060.00915.92
7.1.120.0090.00615.83
7.1.110.0060.00815.81
7.1.100.0050.00715.83
7.1.90.0050.00815.91
7.1.80.0050.00915.84
7.1.70.0050.00815.83
7.1.60.0160.00721.84
7.1.50.0120.00821.64
7.1.40.0130.00921.73
7.1.30.0050.01521.60
7.1.20.0160.00421.88
7.1.10.0090.00515.79
7.1.00.0060.01015.87
7.0.330.0070.00815.54
7.0.320.0050.01015.60
7.0.310.0060.00515.41
7.0.300.0020.01015.40
7.0.290.0050.00815.57
7.0.280.0030.01015.54
7.0.270.0000.01215.46
7.0.260.0060.00415.47
7.0.250.0110.00315.54
7.0.240.0110.00315.48
7.0.230.0050.00715.67
7.0.220.0070.00715.49
7.0.210.0070.00815.54
7.0.200.0040.01115.49
7.0.190.0100.00615.49
7.0.180.0090.00315.52
7.0.170.0010.01115.77
7.0.160.0050.01015.29
7.0.150.0050.00815.44
7.0.140.0050.01215.54
7.0.130.0020.01015.55
7.0.120.0020.01115.61
7.0.110.0020.01115.35
7.0.100.0050.00515.50
7.0.90.0070.00915.53
7.0.80.0050.00715.58
7.0.70.0080.01015.26
7.0.60.0070.01015.63
7.0.50.0050.01015.56
7.0.40.0090.00213.59
7.0.30.0050.00713.69
7.0.20.0020.00913.63
7.0.10.0080.00513.42
7.0.00.0050.01013.61
5.6.400.0070.00814.41
5.6.390.0060.00314.64
5.6.380.0050.00914.49
5.6.370.0040.00714.29
5.6.360.0020.01014.38
5.6.350.0060.00914.62
5.6.340.0050.00614.54
5.6.330.0060.00814.85
5.6.320.0050.00914.46
5.6.310.0050.00914.29
5.6.300.0070.00814.41
5.6.290.0060.01014.77
5.6.280.0100.00514.51
5.6.270.0070.00714.63
5.6.260.0030.01014.47
5.6.250.0070.00714.64
5.6.240.0050.01014.55
5.6.230.0100.00614.53
5.6.220.0060.01014.63
5.6.210.0060.01114.46
5.6.200.0070.00714.28
5.6.190.0060.00814.44
5.6.180.0100.00714.33
5.6.170.0020.01314.41
5.6.160.0060.00814.48
5.6.150.0050.00914.51
5.6.140.0030.00814.60
5.6.130.0040.00914.52
5.6.120.0050.01014.63
5.6.110.0090.00614.62
5.6.100.0050.01114.54
5.6.90.0090.00814.60
5.6.80.0050.00914.39
5.6.70.0050.00714.34
5.6.60.0090.00714.51
5.6.50.0020.01114.40
5.6.40.0060.00714.34
5.6.30.0130.00414.55
5.6.20.0020.00914.47
5.6.10.0050.00914.49
5.6.00.0040.00714.40

preferences:
44.45 ms | 401 KiB | 5 Q