3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = '<table> <tbody> <tr><tr> <tr> <td> <table class="style124"> <tbody> <tr> <td>A</td> </tr> <tr> <td> </td> //THIS !! </tr> </tbody> </table> </td> </tr> <tr></tr> </tbody> </table>'; $dom = new DOMDocument; $dom->loadHTML($html); $xpath = new DOMXPath($dom); $query = '//table[contains(@class, "style124")]/tbody/tr[2]/td'; $entries = $xpath->query($query); foreach($entries as $entry){ if(empty(trim($entry->nodeValue))){ echo 'no value'; } else { echo $entry->nodeValue; } }

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.10.0130.00617.06
8.5.00.0120.00920.54
8.4.150.0030.00014.05
8.4.140.0140.00817.81
8.4.130.0100.01218.10
8.4.120.0060.00320.92
8.4.110.0050.00519.42
8.4.100.0130.00918.11
8.4.90.0130.00719.97
8.4.80.0070.00217.96
8.4.70.0110.00918.09
8.4.60.0150.00220.81
8.4.50.0020.00618.94
8.4.40.0130.00617.72
8.4.30.0030.00620.73
8.4.20.0100.01019.91
8.4.10.0080.00019.82
8.3.280.0140.00718.70
8.3.270.0120.00916.95
8.3.260.0100.01017.14
8.3.250.0110.00719.34
8.3.240.0100.00616.86
8.3.230.0140.00516.93
8.3.220.0040.00617.54
8.3.210.0170.00517.15
8.3.200.0050.00416.73
8.3.190.0080.00817.51
8.3.180.0110.00819.35
8.3.170.0000.00816.69
8.3.160.0040.01117.43
8.3.150.0140.00417.43
8.3.140.0070.00321.04
8.3.130.0000.00818.74
8.3.120.0000.01119.37
8.3.110.0040.00420.94
8.3.100.0000.01024.06
8.3.90.0100.01026.77
8.3.80.0030.00619.36
8.3.70.0120.00318.76
8.3.60.0060.01216.75
8.3.50.0150.00523.71
8.3.40.0100.00322.34
8.3.30.0090.00618.96
8.3.20.0040.00424.18
8.3.10.0050.00324.66
8.3.00.0000.00826.16
8.2.290.0100.00719.46
8.2.280.0130.00618.52
8.2.270.0150.00417.26
8.2.260.0030.00517.18
8.2.250.0130.00318.74
8.2.240.0030.00717.43
8.2.230.0080.00022.58
8.2.220.0100.01037.54
8.2.210.0040.00426.77
8.2.200.0030.00618.88
8.2.190.0130.00716.91
8.2.180.0040.01125.92
8.2.170.0130.00319.16
8.2.160.0160.00322.96
8.2.150.0080.00025.66
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0070.00026.35
8.2.110.0060.00321.42
8.2.100.0000.01018.09
8.2.90.0050.00318.28
8.2.80.0050.00318.18
8.2.70.0040.00418.00
8.2.60.0000.00817.88
8.2.50.0050.00318.05
8.2.40.0050.00320.13
8.2.30.0000.00718.42
8.2.20.0040.00418.46
8.2.10.0000.00719.66
8.2.00.0000.00719.70
8.1.330.0100.00917.14
8.1.320.0140.00616.75
8.1.310.0090.00618.46
8.1.300.0120.00419.08
8.1.290.0060.00330.84
8.1.280.0040.01225.92
8.1.270.0080.00024.19
8.1.260.0050.00328.09
8.1.250.0040.00428.09
8.1.240.0060.00324.02
8.1.230.0000.01121.29
8.1.220.0000.00817.91
8.1.210.0060.00319.29
8.1.200.0100.00017.50
8.1.190.0040.00417.60
8.1.180.0040.00418.10
8.1.170.0040.00418.97
8.1.160.0070.00019.31
8.1.150.0070.00019.13
8.1.140.0000.00819.21
8.1.130.0040.00417.69
8.1.120.0030.00817.84
8.1.110.0050.00317.72
8.1.100.0000.00817.71
8.1.90.0000.00717.74
8.1.80.0000.00817.77
8.1.70.0030.00317.79
8.1.60.0060.00317.97
8.1.50.0040.00417.77
8.1.40.0040.00417.77
8.1.30.0090.00018.02
8.1.20.0040.00817.99
8.1.10.0020.00517.84
8.1.00.0030.00617.73
8.0.300.0000.00719.90
8.0.290.0030.00617.00
8.0.280.0020.00518.81
8.0.270.0000.00718.22
8.0.260.0000.00817.09
8.0.250.0000.00717.18
8.0.240.0070.00017.16
8.0.230.0000.00717.22
8.0.220.0030.00317.24
8.0.210.0000.00717.21
8.0.200.0070.00017.18
8.0.190.0050.00217.20
8.0.180.0070.00017.23
8.0.170.0040.00417.22
8.0.160.0070.00017.32
8.0.150.0040.00417.21
8.0.140.0050.00317.17
8.0.130.0000.00613.63
8.0.120.0040.00417.25
8.0.110.0040.00417.15
8.0.100.0060.00317.37
8.0.90.0000.00817.07
8.0.80.0110.00517.17
8.0.70.0000.00817.09
8.0.60.0080.00017.29
8.0.50.0040.00417.14
8.0.30.0090.01217.52
8.0.20.0070.01917.53
8.0.10.0040.00417.32
8.0.00.0050.01317.13
7.4.330.0050.00015.55
7.4.320.0070.00016.96
7.4.300.0000.00716.90
7.4.290.0040.00416.79
7.4.280.0040.00416.75
7.4.270.0000.00716.92
7.4.260.0050.00013.63
7.4.250.0040.00416.87
7.4.240.0000.00716.82
7.4.230.0030.00316.78
7.4.220.0000.00716.80
7.4.210.0080.00616.85
7.4.200.0030.00316.77
7.4.130.0150.00416.91
7.4.120.0060.01516.82
7.4.110.0110.00716.77
7.4.100.0100.01016.72
7.4.90.0090.00916.59
7.4.80.0090.00916.72
7.4.70.0000.01816.99
7.4.60.0120.00616.75
7.4.50.0170.00616.53
7.4.40.0150.00616.89
7.4.30.0100.01316.90
7.4.20.0030.01716.77
7.4.10.0180.00816.81
7.4.00.0170.00816.72
7.3.330.0000.00716.61
7.3.320.0000.00513.39
7.3.310.0050.00216.52
7.3.300.0000.00816.52
7.3.290.0070.00816.56
7.3.260.0090.00916.63
7.3.250.0150.00416.64
7.3.240.0110.00716.45
7.3.230.0120.00616.86
7.3.220.0030.01616.59
7.3.210.0140.00316.72
7.3.200.0160.00316.72
7.3.190.0130.00516.57
7.3.180.0110.00616.85
7.3.170.0160.00416.82
7.3.160.0180.00616.63
7.3.150.0180.00616.65
7.3.140.0060.02017.00
7.3.130.0070.01716.71
7.3.120.0060.01216.59
7.3.110.0130.01016.79
7.3.100.0090.00916.49
7.3.90.0140.01116.82
7.3.80.0150.00416.55
7.3.70.0120.00616.74
7.3.60.0160.00916.76
7.3.50.0100.01416.81
7.3.40.0110.00716.75
7.3.30.0130.00716.63
7.3.20.0160.01016.72
7.3.10.0110.01116.78
7.3.00.0160.01016.65

preferences:
176.27 ms | 403 KiB | 5 Q