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) { $tags = $row->getElementsByTagName('*'); $result[] = [ 'name' => $tags->item(0)->nodeValue, 'value' => $tags->item(1)->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.0120.00822.55
8.4.110.0100.00922.52
8.4.100.0130.00718.86
8.4.90.0150.00619.09
8.4.80.0110.00718.86
8.4.70.0040.00417.86
8.4.60.0050.00318.01
8.4.50.0060.00618.07
8.4.40.0150.00619.02
8.4.30.0170.00318.92
8.4.20.0070.01318.08
8.4.10.0080.00019.37
8.3.250.0090.01119.12
8.3.240.0160.00217.33
8.3.230.0100.00916.76
8.3.220.0160.00719.15
8.3.210.0110.00816.87
8.3.200.0090.00316.80
8.3.190.0080.01017.05
8.3.180.0050.00516.86
8.3.170.0130.00618.94
8.3.160.0110.00716.62
8.3.150.0120.00620.78
8.3.140.0040.00416.73
8.3.130.0050.00518.65
8.3.120.0030.01320.80
8.3.110.0070.00016.63
8.3.100.0040.01524.06
8.3.90.0110.00726.77
8.3.80.0030.00617.97
8.3.70.0070.01416.87
8.3.60.0180.00418.41
8.3.50.0070.00716.83
8.3.40.0110.00722.41
8.3.30.0070.01121.90
8.3.20.0080.00024.18
8.3.10.0080.00024.66
8.3.00.0030.00626.16
8.2.290.0100.00920.87
8.2.280.0090.00918.60
8.2.270.0110.00417.31
8.2.260.0070.00016.72
8.2.250.0060.00318.67
8.2.240.0090.00617.46
8.2.230.0060.00320.94
8.2.220.0090.00037.54
8.2.210.0080.00026.77
8.2.200.0000.01218.29
8.2.190.0140.00016.72
8.2.180.0040.01116.63
8.2.170.0040.01119.20
8.2.160.0030.01022.96
8.2.150.0040.00425.66
8.2.140.0050.00324.66
8.2.130.0000.00826.16
8.2.120.0060.00321.35
8.2.110.0130.00722.38
8.2.100.0110.01121.28
8.2.90.0190.01219.00
8.2.80.0190.00618.97
8.2.70.0200.00818.97
8.2.60.0210.00619.00
8.2.50.0190.00418.89
8.2.40.0140.00319.09
8.2.30.0160.00818.69
8.2.20.0240.00019.07
8.2.10.0100.00519.46
8.2.00.0090.00519.49
8.1.330.0150.00622.00
8.1.320.0100.00616.25
8.1.310.0070.00718.60
8.1.300.0070.00018.93
8.1.290.0060.00630.84
8.1.280.0070.01425.92
8.1.270.0050.00224.66
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0140.00018.91
8.1.230.0130.00318.91
8.1.220.0170.00618.70
8.1.210.0180.00720.11
8.1.200.0260.00618.55
8.1.190.0190.01118.51
8.1.180.0190.00818.48
8.1.170.0100.01418.75
8.1.160.0170.00719.07
8.1.150.0220.00020.68
8.1.140.0290.00318.50
8.1.130.0180.00618.81
8.1.120.0130.00718.75
8.1.110.0060.00818.80
8.1.100.0110.01418.61
8.1.90.0220.00620.29
8.1.80.0170.00318.72
8.1.70.0090.00419.08
8.1.60.0120.00418.96
8.1.50.0120.00618.77
8.1.40.0150.00019.06
8.1.30.0060.00619.11
8.1.20.0130.00318.99
8.1.10.0140.00019.08
8.1.00.0060.01118.61
8.0.300.0230.00318.02
8.0.290.0110.00418.02
8.0.280.0110.00318.11
8.0.270.0060.00818.10
8.0.260.0120.00318.02
8.0.250.0110.00418.13
8.0.240.0050.00918.09
8.0.230.0060.00618.62
8.0.220.0080.00818.01
8.0.210.0110.00318.02
8.0.200.0210.00718.13
8.0.190.0050.00918.25
8.0.180.0120.00318.08
8.0.170.0090.00618.18
8.0.160.0140.00318.08
8.0.150.0110.00417.99
8.0.140.0120.00418.14
8.0.130.0160.00318.31
8.0.120.0220.00318.01
8.0.110.0190.00018.01
8.0.100.0180.00317.98
8.0.90.0150.00018.13
8.0.80.0080.00818.17
8.0.70.0160.00017.99
8.0.60.0090.00617.95
8.0.50.0120.00318.13
8.0.30.0110.00218.43
8.0.20.0120.00318.12
8.0.10.0130.00318.23

preferences:
31.48 ms | 403 KiB | 5 Q