3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<HTML <html> <head>...</head> <body> (some js and css) <div class="no_remove">(content)</div> <div class="no_remove">(content that i didn't want to remove) <div class="remove"> <span>(content)</span> <span>(content)</span> <span>(content)</span> <div class="other1">(content)</div> <div class="other2">(content)</div> <div class="other3">(content)</div> </div> </div> </body> </html> HTML; libxml_use_internal_errors(true); $dom=new DOMDocument; $dom->loadHTML($html, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); $xpath = new DOMXPath($dom); foreach($xpath->query('//div[@class="remove"]') as $div) { $div->parentNode->removeChild($div); } echo $dom->saveHTML();

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.0170.00920.06
8.4.150.0030.00014.05
8.4.140.0090.01418.30
8.4.130.0050.00419.13
8.4.120.0060.00324.40
8.4.110.0090.01120.84
8.4.100.0090.01018.25
8.4.90.0050.00321.32
8.4.80.0130.00719.30
8.4.70.0120.00719.45
8.4.60.0130.00821.10
8.4.50.0100.00819.09
8.4.40.0210.00018.18
8.4.30.0170.00317.73
8.4.20.0040.00718.18
8.4.10.0050.00321.03
8.3.280.0090.01018.67
8.3.270.0100.01016.81
8.3.260.0090.01017.22
8.3.250.0100.00919.42
8.3.240.0110.00717.33
8.3.230.0130.00416.86
8.3.220.0090.01019.35
8.3.210.0060.00518.83
8.3.200.0030.00516.79
8.3.190.0160.00517.20
8.3.180.0050.00316.83
8.3.170.0060.01319.56
8.3.160.0030.01520.70
8.3.150.0040.00417.05
8.3.140.0130.00717.33
8.3.130.0060.00318.83
8.3.120.0040.00420.96
8.3.110.0090.00017.16
8.3.100.0060.01218.80
8.3.90.0000.00826.77
8.3.80.0000.00917.25
8.3.70.0070.01116.75
8.3.60.0040.01118.80
8.3.50.0070.00918.65
8.3.40.0180.00419.23
8.3.30.0100.00619.09
8.3.20.0040.00419.39
8.3.10.0080.00022.23
8.3.00.0000.00819.93
8.2.290.0110.00817.02
8.2.280.0130.00518.82
8.2.270.0150.00619.29
8.2.260.0080.00018.97
8.2.250.0030.00717.80
8.2.240.0060.01318.62
8.2.230.0060.00320.94
8.2.220.0080.00024.06
8.2.210.0090.00926.77
8.2.200.0060.00316.88
8.2.190.0140.00717.13
8.2.180.0150.00625.92
8.2.170.0060.00919.14
8.2.160.0030.01022.96
8.2.150.0080.00025.66
8.2.140.0050.00324.66
8.2.130.0050.00320.45
8.2.120.0000.00826.35
8.2.110.0090.00020.77
8.2.100.0160.00018.16
8.2.90.0000.00818.13
8.2.80.0060.00319.06
8.2.70.0060.00317.88
8.2.60.0040.00418.22
8.2.50.0040.00418.05
8.2.40.0050.00318.41
8.2.30.0000.00719.69
8.2.20.0040.00418.84
8.2.10.0050.00518.93
8.2.00.0070.00519.52
8.1.330.0140.00522.25
8.1.320.0130.00616.49
8.1.310.0110.00718.69
8.1.300.0130.00317.00
8.1.290.0050.00530.84
8.1.280.0070.01125.92
8.1.270.0120.00624.66
8.1.260.0080.00026.35
8.1.250.0060.00328.09
8.1.240.0060.00321.47
8.1.230.0120.00019.39
8.1.220.0000.00918.16
8.1.210.0090.00018.77
8.1.200.0060.00317.85
8.1.190.0040.00417.36
8.1.180.0030.00618.10
8.1.170.0040.00417.62
8.1.160.0090.00019.19
8.1.150.0050.00519.18
8.1.140.0060.00318.58
8.1.130.0040.00719.17
8.1.120.0000.01118.40
8.1.110.0070.00518.44
8.1.100.0070.00718.48
8.1.90.0080.00518.48
8.1.80.0080.00518.34
8.1.70.0040.00818.47
8.1.60.0090.00518.53
8.1.50.0070.00718.47
8.1.40.0110.00318.50
8.1.30.0080.00618.45
8.1.20.0160.00418.29
8.1.10.0120.00418.32
8.1.00.0120.00618.29
8.0.300.0060.00320.47
8.0.290.0000.00917.00
8.0.280.0000.00718.68
8.0.270.0030.00518.04
8.0.260.0080.00317.94
8.0.250.0070.00417.90
8.0.240.0080.00417.90
8.0.230.0070.00417.83
8.0.220.0100.00217.79
8.0.210.0080.00317.83
8.0.200.0060.00617.78
8.0.190.0050.00617.81
8.0.180.0050.00517.92
8.0.170.0040.00817.98
8.0.160.0050.00717.90
8.0.150.0090.00717.59
8.0.140.0120.00517.55
8.0.130.0140.00316.41
8.0.120.0120.00517.57
8.0.110.0080.00617.60
8.0.100.0090.00617.58
8.0.90.0080.00617.55
8.0.80.0070.00917.63
8.0.70.0140.00317.64
8.0.60.0110.00417.63
8.0.50.0110.00517.56
8.0.30.0100.00817.50
8.0.20.0110.00917.59
8.0.10.0100.01017.85
8.0.00.0110.00817.59
7.4.330.0090.00116.18
7.4.320.0090.00417.58
7.4.300.0090.00317.44
7.4.290.0080.00417.46
7.4.280.0060.00617.33
7.4.270.0110.00417.18
7.4.260.0160.00317.23
7.4.250.0150.00517.18
7.4.240.0140.00417.25
7.4.230.0150.00317.13
7.4.220.0100.00517.29
7.4.210.0130.00617.16
7.4.200.0100.00417.28
7.4.190.0140.00517.49
7.4.180.0120.00617.50
7.4.160.0080.01017.12
7.4.150.0120.00817.15
7.4.140.0130.00617.59
7.4.130.0090.01117.08
7.4.120.0100.00916.94
7.4.110.0100.00816.97
7.4.100.0090.01017.03
7.4.90.0120.00817.05
7.4.80.0160.00317.50
7.4.70.0100.00817.02
7.4.60.0120.00516.98
7.4.50.0090.01016.90
7.4.40.0110.00817.02
7.4.30.0110.01016.94
7.4.20.0120.00817.00
7.4.10.0130.00616.99
7.4.00.0090.01016.62
7.3.330.0110.00315.95
7.3.320.0110.00315.97
7.3.310.0100.00416.86
7.3.300.0090.00516.90
7.3.290.0090.00616.96
7.3.280.0110.00616.92
7.3.270.0110.00917.01
7.3.260.0100.00816.85
7.3.250.0130.00816.92
7.3.240.0100.00916.89
7.3.230.0100.01116.87
7.3.220.0140.00816.94
7.3.210.0130.00716.81
7.3.200.0100.00916.81
7.3.190.0160.00516.87
7.3.180.0120.00716.98
7.3.170.0120.00716.74
7.3.160.0110.00716.84
7.3.150.0110.00816.82
7.3.140.0110.00816.90
7.3.130.0110.00816.86
7.3.120.0140.00516.84
7.3.110.0120.00716.76
7.3.100.0140.00516.85
7.3.90.0110.00716.95
7.3.80.0160.00316.88
7.3.70.0070.01116.82
7.3.60.0110.00916.87
7.3.50.0110.00916.80
7.3.40.0120.00616.86
7.3.30.0120.00816.94
7.3.20.0160.00617.29
7.3.10.0130.00817.16
7.3.00.0130.00717.25
7.2.340.0150.00717.17
7.2.330.0140.00617.11
7.2.320.0130.00717.11
7.2.310.0110.00817.05
7.2.300.0140.00817.09
7.2.290.0150.00817.04
7.2.280.0170.01117.14
7.2.270.0140.00917.08
7.2.260.0150.00817.11
7.2.250.0180.00517.10
7.2.240.0130.00917.16
7.2.230.0130.00917.09
7.2.220.0140.01017.15
7.2.210.0140.00717.17
7.2.200.0100.01417.11
7.2.190.0170.00617.05
7.2.180.0130.01117.13
7.2.170.0140.00817.23
7.2.160.0160.00717.10
7.2.150.0160.00817.58
7.2.140.0420.01117.65
7.2.130.0150.01017.62
7.2.120.0250.00517.51
7.2.110.0150.01017.55
7.2.100.0200.00617.51
7.2.90.0170.01017.49
7.2.80.0140.01017.63
7.2.70.0180.00517.54
7.2.60.0140.00817.40
7.2.50.0200.01017.52
7.2.40.0920.00817.71
7.2.30.0580.00817.68
7.2.20.0460.00717.66
7.2.10.0940.01217.64
7.2.00.1390.00917.68
7.1.330.0150.01016.41
7.1.320.0200.00516.45
7.1.310.0260.00516.51
7.1.300.0180.00816.43
7.1.290.0180.00816.52
7.1.280.0170.01116.41
7.1.270.0160.01016.48
7.1.260.0190.00716.49
7.1.250.0190.00716.38
7.1.240.0180.00916.49
7.1.230.0200.00616.51
7.1.220.0200.00716.49
7.1.210.0210.00716.43
7.1.200.0160.00716.30
7.1.190.0240.00616.50
7.1.180.0190.00616.38
7.1.170.0200.00816.37
7.1.160.0630.01016.50
7.1.150.0710.00716.54
7.1.140.0510.00816.52
7.1.130.0670.00716.52
7.1.120.1410.00916.50
7.1.110.0840.01016.29
7.1.100.1050.00716.40
7.1.90.1440.00716.32
7.1.80.1670.00716.33
7.1.70.0570.00616.10
7.1.60.0700.00821.31
7.1.50.1330.01021.26
7.1.40.2030.00821.06
7.1.30.1820.00821.14
7.1.20.1700.01021.07
7.1.10.1630.00715.97
7.1.00.0440.00716.03
7.0.330.0150.00816.19
7.0.320.0200.00616.14
7.0.310.0150.00916.16
7.0.300.0200.00416.15
7.0.290.0180.00716.18
7.0.280.0160.00916.17
7.0.270.0170.00716.19
7.0.260.0190.00616.08
7.0.250.0290.00716.20
7.0.240.0130.01016.25
7.0.230.0160.00816.18
7.0.220.0180.00816.20
7.0.210.0200.00616.23
7.0.200.0170.00916.22
7.0.190.0150.00916.11
7.0.180.0230.00316.14
7.0.170.0210.00516.22
7.0.160.0160.00816.15
7.0.150.0160.00916.19
7.0.140.0200.00516.13
7.0.130.0180.00716.20
7.0.120.0220.00616.22
7.0.110.0190.00616.16
7.0.100.0240.00416.12
7.0.90.0190.00516.13
7.0.80.0180.00716.19
7.0.70.0180.00616.18
7.0.60.0160.00916.19
7.0.50.0150.01016.12
7.0.40.0190.00616.14
7.0.30.0170.00716.07
7.0.20.0170.00716.16
7.0.10.0150.01016.21
7.0.00.0160.00816.18
5.6.400.0140.01116.40
5.6.390.0110.01216.29
5.6.380.0150.01116.38
5.6.370.0180.00716.33
5.6.360.0180.00716.45
5.6.350.0170.00816.48
5.6.340.0150.00816.41
5.6.330.0170.00816.43
5.6.320.0170.00816.42
5.6.310.0170.00816.43
5.6.300.0170.00716.39
5.6.290.0150.01116.37
5.6.280.0150.01016.42
5.6.270.0180.00716.43
5.6.260.0170.00816.43
5.6.250.0150.00916.42
5.6.240.0160.00916.45
5.6.230.0170.00716.43
5.6.220.0170.00716.34
5.6.210.0140.01116.38
5.6.200.0160.01016.44
5.6.190.0170.00816.44
5.6.180.0170.00816.44
5.6.170.0180.00716.47
5.6.160.0140.01116.51
5.6.150.0150.01016.44
5.6.140.0140.01016.44
5.6.130.0150.00916.45
5.6.120.0170.01016.47
5.6.110.0150.01016.34
5.6.100.0160.01016.43
5.6.90.0140.01016.37
5.6.80.0170.00816.39
5.6.70.0140.01016.34
5.6.60.0160.00916.38
5.6.50.0140.01016.36
5.6.40.0160.00816.36
5.6.30.0160.00716.31
5.6.20.0150.01016.29
5.6.10.0160.00916.26
5.6.00.0210.00416.29

preferences:
159.31 ms | 403 KiB | 5 Q