3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<HTML <div> <div class="coincodex-content"> hello this is content <div class="delete_this" style="margin: 8px 0; clear: both;"> <div> <center><span style="font-size:11px; color: gray;">TEST</span></center> <b>TEST</b><br><br> </div> </div> <div class="preserved"> Test2 </div> </div> </div> HTML; $doc = new DOMDocument(); $doc->loadHTML($html); $xpath = new DOMXPath($doc); $nodelist = $xpath->query( '//*[@class="coincodex-content"]' ); $fragment = []; foreach($nodelist as $contentNode){ $removeNodelist = $xpath->query('//div[@class="delete_this"]',$contentNode); $item = $removeNodelist->item(0); //only first $item->parentNode->removeChild($item); $fragment[] = $doc->saveHTML($contentNode); } echo $fragment[0];

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.00.0040.00620.53
8.4.150.0020.00114.05
8.4.140.0150.00617.89
8.4.130.0100.01019.02
8.4.120.0070.01124.38
8.4.110.0100.00519.13
8.4.100.0160.00418.78
8.4.90.0140.00621.11
8.4.80.0050.00520.15
8.4.70.0090.00318.39
8.4.60.0130.00819.20
8.4.50.0140.00717.99
8.4.40.0090.00920.07
8.4.30.0170.00320.77
8.4.20.0120.00918.52
8.4.10.0140.00720.70
8.3.280.0160.00820.50
8.3.270.0120.00816.76
8.3.260.0100.00916.90
8.3.250.0100.00619.45
8.3.240.0130.00717.45
8.3.230.0140.00517.22
8.3.220.0110.00617.71
8.3.210.0060.00217.18
8.3.200.0030.00616.99
8.3.190.0120.00317.68
8.3.180.0130.00617.13
8.3.170.0060.01219.30
8.3.160.0090.00917.19
8.3.150.0150.00320.93
8.3.140.0060.00317.21
8.3.130.0060.00318.64
8.3.120.0040.00419.42
8.3.110.0060.00320.94
8.3.100.0130.00316.91
8.3.90.0150.00026.77
8.3.80.0030.00618.66
8.3.70.0140.00416.88
8.3.60.0170.00717.00
8.3.50.0080.01118.89
8.3.40.0080.00622.11
8.3.30.0120.00319.62
8.3.20.0030.00524.18
8.3.10.0040.00424.66
8.3.00.0050.00326.16
8.2.290.0090.00920.82
8.2.280.0130.00618.79
8.2.270.0090.00917.53
8.2.260.0090.00918.94
8.2.250.0080.00017.09
8.2.240.0040.00419.14
8.2.230.0110.00722.58
8.2.220.0040.00737.54
8.2.210.0090.00626.77
8.2.200.0040.00817.00
8.2.190.0190.00318.66
8.2.180.0120.00625.92
8.2.170.0140.00019.47
8.2.160.0100.00322.96
8.2.150.0040.00425.66
8.2.140.0070.00024.66
8.2.130.0070.00026.16
8.2.120.0060.00319.40
8.2.110.0090.00019.71
8.2.100.0090.00318.34
8.2.90.0040.00418.34
8.2.80.0030.00618.43
8.2.70.0060.00318.00
8.2.60.0000.00818.55
8.2.50.0080.00018.07
8.2.40.0040.00420.45
8.2.30.0040.00418.41
8.2.20.0050.00220.77
8.2.10.0060.00318.45
8.2.00.0040.00419.74
8.1.330.0120.00522.35
8.1.320.0040.00416.50
8.1.310.0030.00618.84
8.1.300.0030.00616.74
8.1.290.0060.00630.84
8.1.280.0070.01025.92
8.1.270.0040.00423.99
8.1.260.0090.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00022.94
8.1.230.0090.00321.16
8.1.220.0000.00818.29
8.1.210.0000.00919.38
8.1.200.0050.00517.73
8.1.190.0040.00417.60
8.1.180.0000.00818.10
8.1.170.0000.00819.02
8.1.160.0000.01119.18
8.1.150.0040.00419.03
8.1.140.0030.00617.86
8.1.130.0000.00719.26
8.1.120.0040.00417.77
8.1.110.0040.00417.87
8.1.100.0030.00617.74
8.1.90.0060.00317.84
8.1.80.0070.00017.88
8.1.70.0030.00317.87
8.1.60.0040.00417.91
8.1.50.0040.00417.87
8.1.40.0180.00417.79
8.1.30.0070.00417.95
8.1.20.0040.00917.89
8.1.10.0140.00017.89
8.1.00.0050.00717.82
8.0.300.0030.00620.40
8.0.290.0040.00417.38
8.0.280.0000.00718.96
8.0.270.0040.00418.48
8.0.260.0000.00618.71
8.0.250.0000.00817.45
8.0.240.0030.00317.45
8.0.230.0070.00017.31
8.0.220.0030.00317.30
8.0.210.0000.00817.34
8.0.200.0000.00617.30
8.0.190.0050.00317.41
8.0.180.0000.00717.39
8.0.170.0050.00517.20
8.0.160.0080.00417.25
8.0.150.0090.00517.30
8.0.140.0040.01217.16
8.0.130.0110.00817.24
8.0.120.0120.00017.23
8.0.110.0090.00517.34
8.0.100.0110.00517.36
8.0.90.0080.00817.32
8.0.80.0060.00617.15
8.0.70.0150.00617.19
8.0.60.0180.00017.25
8.0.50.0060.00317.38
8.0.30.0000.00817.27
8.0.20.0140.00017.32
8.0.10.0030.00817.37
7.4.330.0020.00215.55
7.4.320.0030.00316.98
7.4.300.0060.00017.02
7.4.290.0040.00416.83
7.4.280.0180.00416.98
7.4.270.0140.00316.90
7.4.260.0220.00016.91
7.4.250.0060.00616.91
7.4.240.0160.00016.98
7.4.230.0200.00316.77
7.4.220.0060.01116.79
7.4.210.0100.00516.91
7.4.200.0150.00416.79
7.4.190.0140.00517.01
7.4.180.0130.00016.85
7.4.160.0050.00517.04
7.4.150.0040.00716.78
7.4.140.0160.00316.85
7.4.130.0190.00016.85
7.4.120.0090.00316.78
7.4.110.0100.00516.73
7.4.100.0060.00616.96
7.4.90.0080.00516.73
7.4.80.0070.00716.64
7.4.70.0180.00016.73
7.4.60.0100.00016.88
7.4.50.0120.00016.79
7.4.40.0110.00016.64
7.4.30.0150.00416.78
7.4.20.0120.00416.64
7.4.10.0140.00516.66
7.4.00.0180.00016.79

preferences:
29.98 ms | 403 KiB | 5 Q