3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<HTML <table> <tr> <th>test1</th> <td>test1-1</td> </tr> <tr> <th>test2</th> <td>test2-2</td> </tr> </table> HTML; $dom = new DOMDocument(); $dom->loadHTML($html); $result = []; foreach ($dom->getElementsByTagName('tr') as $row) { $result[] = [ 'name' => $row->getElementsByTagName('th')->item(0)->nodeValue, 'value' => $row->getElementsByTagName('td')->item(0)->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.4.120.0110.00922.27
8.4.110.0050.00321.00
8.4.100.0050.00418.11
8.4.90.0140.00718.89
8.4.80.0120.00319.10
8.4.70.0050.00417.83
8.4.60.0130.00820.53
8.4.50.0100.00918.13
8.4.40.0030.01618.77
8.4.30.0100.01018.99
8.4.20.0030.01618.14
8.4.10.0040.00419.70
8.3.250.0100.00918.96
8.3.240.0050.00516.87
8.3.230.0050.00417.10
8.3.220.0110.00819.25
8.3.210.0100.00816.81
8.3.200.0040.00716.66
8.3.190.0100.01016.94
8.3.180.0110.00816.90
8.3.170.0150.00019.35
8.3.160.0090.00916.89
8.3.150.0110.00721.07
8.3.140.0150.00016.93
8.3.130.0080.00016.92
8.3.120.0040.00420.95
8.3.110.0030.00617.13
8.3.100.0050.00324.06
8.3.90.0040.00426.77
8.3.80.0090.00018.55
8.3.70.0070.01516.75
8.3.60.0110.00718.65
8.3.50.0090.00918.78
8.3.40.0090.01222.36
8.3.30.0030.01021.97
8.3.20.0030.00324.18
8.3.10.0040.00424.66
8.3.00.0080.00026.16
8.2.290.0100.00620.46
8.2.280.0120.00217.12
8.2.270.0090.00917.56
8.2.260.0090.00918.48
8.2.250.0000.01618.49
8.2.240.0040.01519.19
8.2.230.0060.00320.94
8.2.220.0140.00437.54
8.2.210.0030.01626.77
8.2.200.0100.00018.79
8.2.190.0060.00916.88
8.2.180.0170.00317.00
8.2.170.0110.00419.11
8.2.160.0070.00722.96
8.2.150.0020.00525.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0050.00221.30
8.2.110.0100.01022.50
8.2.100.0090.01221.17
8.2.90.0250.00619.18
8.2.80.0190.00618.97
8.2.70.0270.01019.03
8.2.60.0150.01119.05
8.2.50.0100.00718.93
8.2.40.0060.00819.07
8.2.30.0090.00618.89
8.2.20.0230.00719.09
8.2.10.0210.00919.43
8.2.00.0160.00619.51
8.1.330.0110.00822.24
8.1.320.0090.01016.41
8.1.310.0040.00418.76
8.1.300.0090.00617.89
8.1.290.0080.00430.84
8.1.280.0070.01125.92
8.1.270.0000.00824.66
8.1.260.0030.00526.35
8.1.250.0080.00028.09
8.1.240.0090.00518.86
8.1.230.0200.00718.69
8.1.220.0120.00918.86
8.1.210.0240.00020.12
8.1.200.0150.00018.64
8.1.190.0250.00018.55
8.1.180.0120.00318.54
8.1.170.0200.00318.68
8.1.160.0120.01219.13
8.1.150.0140.00820.83
8.1.140.0130.00018.57
8.1.130.0100.00318.73
8.1.120.0120.00018.71
8.1.110.0130.00018.80
8.1.100.0120.00318.87
8.1.90.0130.00318.80
8.1.80.0100.00718.67
8.1.70.0140.00019.07
8.1.60.0100.00718.84
8.1.50.0160.00018.93
8.1.40.0110.00318.79
8.1.30.0000.01519.02
8.1.20.0140.00518.95
8.1.10.0110.00319.11
8.1.00.0120.00318.95
8.0.300.0140.00018.02
8.0.290.0070.00718.06
8.0.280.0060.00618.02
8.0.270.0100.00318.07
8.0.260.0120.00318.01
8.0.250.0100.00518.27
8.0.240.0040.00918.09
8.0.230.0120.00018.61
8.0.220.0150.00018.11
8.0.210.0110.00418.02
8.0.200.0090.00618.30
8.0.190.0100.00318.33
8.0.180.0110.00318.25
8.0.170.0120.00418.13
8.0.160.0040.01118.08
8.0.150.0090.00618.18
8.0.140.0160.00018.13
8.0.130.0150.00718.37
8.0.120.0110.00318.12
8.0.110.0170.00318.24
8.0.100.0250.00018.13
8.0.90.0220.00618.21
8.0.80.0120.00318.05
8.0.70.0200.00818.13
8.0.60.0180.00918.06
8.0.50.0180.00718.00
8.0.30.0160.00618.61
8.0.20.0160.00018.26
8.0.10.0060.00918.23

preferences:
50.04 ms | 403 KiB | 5 Q