3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<HTML <html> <head> </head> <body> <table> <tbody> <tr> <td>header1</td> <td>header2</td> <td>header3</td> </tr> <tr> <td>content1</td> <td>content2</td> <td>content3</td> </tr> <tr> <td>test1</td> <td>test2</td> <td>test3</td> </tr> </tbody> </table> </body> </html> HTML; $dom = new DOMDocument(); $dom->loadHTML($html); $result = []; foreach ($dom->getElementsByTagName('tr') as $i => $row) { foreach ($row->getElementsByTagName('td') as $c => $cell) { $result[$c][$i] = $cell->nodeValue; } } var_export($result);

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.30.0110.00719.77
8.5.20.0110.00717.75
8.5.10.0120.01016.79
8.5.00.0110.01120.27
8.4.180.0110.01119.93
8.4.170.0090.01223.95
8.4.160.0150.01124.09
8.4.150.0080.00417.03
8.4.140.0130.00917.92
8.4.130.0100.00917.88
8.4.120.0100.00821.06
8.4.110.0120.00818.89
8.4.100.0100.01119.11
8.4.90.0090.00318.99
8.4.80.0030.00519.10
8.4.70.0100.00520.89
8.4.60.0090.00720.57
8.4.50.0100.01018.99
8.4.40.0140.00319.13
8.4.30.0060.00919.06
8.4.20.0300.00817.78
8.4.10.0290.00618.24
8.3.300.0160.01021.04
8.3.290.0090.01220.96
8.3.280.0120.00818.72
8.3.270.0120.00916.89
8.3.260.0110.00516.92
8.3.250.0110.00719.18
8.3.240.0120.00416.68
8.3.230.0130.00616.93
8.3.220.0090.01019.06
8.3.210.0110.00816.70
8.3.200.0050.00416.89
8.3.190.0090.01017.40
8.3.180.0110.00719.18
8.3.170.0090.00919.16
8.3.160.0110.00716.69
8.3.150.0240.00718.14
8.3.140.0250.00617.03
8.3.130.0240.00516.77
8.3.120.0220.00417.76
8.3.110.0180.00518.04
8.3.100.0290.00419.23
8.3.90.0290.00519.88
8.3.80.0200.01017.35
8.3.70.0310.00517.27
8.3.60.0270.00719.10
8.3.50.0220.01019.05
8.3.40.0230.01420.96
8.3.30.0310.00720.86
8.3.20.0240.00821.41
8.3.10.0260.00521.57
8.3.00.0210.00921.95
8.2.300.0110.01019.06
8.2.290.0100.00820.62
8.2.280.0120.00718.70
8.2.270.0240.00716.91
8.2.260.0220.01017.19
8.2.250.0210.01017.44
8.2.240.0200.00917.50
8.2.230.0240.00418.63
8.2.220.0200.00923.65
8.2.210.0270.00520.05
8.2.200.0280.00316.75
8.2.190.0250.00716.61
8.2.180.0240.01019.48
8.2.170.0290.01320.23
8.2.160.0320.00821.10
8.2.150.0250.00721.73
8.2.140.0240.00921.48
8.2.130.0260.00821.84
8.2.120.0300.00420.66
8.2.110.0340.00520.83
8.2.100.0300.00820.71
8.2.90.0280.00920.14
8.2.80.0260.01020.14
8.2.70.0320.00820.07
8.2.60.0300.00819.97
8.2.50.0270.01019.89
8.2.40.0320.00520.04
8.2.30.0250.00819.98
8.2.20.0240.00720.02
8.2.10.0250.00820.11
8.2.00.0210.01020.08
8.1.340.0110.00921.95
8.1.330.0130.00623.87
8.1.320.0100.01016.20
8.1.310.0260.00317.01
8.1.300.0180.01017.68
8.1.290.0180.01020.90
8.1.280.0280.00721.10
8.1.270.0260.00821.22
8.1.260.0290.00221.90
8.1.250.0240.00822.26
8.1.240.0240.00919.97
8.1.230.0260.00720.00
8.1.220.0270.00919.94
8.1.210.0300.00820.14
8.1.200.0280.01219.90
8.1.190.0300.00919.75
8.1.180.0340.00419.87
8.1.170.0300.00619.84
8.1.160.0240.01119.91
8.1.150.0260.00720.31
8.1.140.0270.00619.77
8.1.130.0260.00619.89
8.1.120.0200.01220.00
8.1.110.0270.00719.92
8.1.100.0280.00819.80
8.1.90.0280.00719.93
8.1.80.0280.00719.77
8.1.70.0220.00919.85
8.1.60.0250.00919.97
8.1.50.0240.01320.02
8.1.40.0240.01219.97
8.1.30.0260.00820.03
8.1.20.0250.00919.93
8.1.10.0250.00820.05
8.1.00.0240.00919.83
8.0.300.0220.01019.39
8.0.290.0290.00419.43
8.0.280.0230.00819.38
8.0.270.0260.00619.34
8.0.260.0250.00519.39
8.0.250.0240.01019.39
8.0.240.0230.01019.44
8.0.230.0230.00619.54
8.0.220.0250.00519.41
8.0.210.0250.00319.41
8.0.200.0270.01119.35
8.0.190.0220.00919.50
8.0.180.0270.00619.38
8.0.170.0260.00719.44
8.0.160.0260.00819.38
8.0.150.0270.00619.42
8.0.140.0230.00519.39
8.0.130.0210.00519.47
8.0.120.0220.00619.73
8.0.110.0200.00719.85
8.0.100.0280.00719.79
8.0.90.0260.00819.35
8.0.80.0270.00519.38
8.0.70.0260.00719.40
8.0.60.0270.00719.39
8.0.50.0240.00919.34
8.0.30.0240.00719.50
8.0.20.0230.00819.44
8.0.10.0250.00519.44

preferences:
50.92 ms | 1151 KiB | 5 Q