3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<HTML This is a test buton. <span id="UmniBooking_36" class="insideB" type="Form" style="cursor: pointer;color:" role="button" >Click here</span> HTML; $dom = new DOMDocument; $dom->loadHTML($html, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); foreach ($dom->getElementsByTagName('span') as $span) { if ($span->getAttribute('role') === 'button') { $parent = $span->parentNode; $parent->removeChild($span); $parent->nodeValue = trim($parent->nodeValue); } } 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.4.130.0160.00419.05
8.4.120.0110.01020.40
8.4.110.0100.00819.11
8.4.100.0130.00818.06
8.4.90.0110.01020.88
8.4.80.0070.00619.10
8.4.70.0110.00918.91
8.4.60.0050.00520.89
8.4.50.0110.00819.19
8.4.40.0130.00717.95
8.4.30.0100.01018.86
8.4.20.0130.00719.83
8.4.10.0100.01019.52
8.3.260.0110.00816.92
8.3.250.0130.00716.66
8.3.240.0090.00916.73
8.3.230.0130.00616.75
8.3.220.0110.00820.91
8.3.210.0030.00516.84
8.3.200.0040.00516.70
8.3.190.0110.00717.44
8.3.180.0020.00619.04
8.3.170.0120.00617.62
8.3.160.0120.00618.84
8.3.150.0150.00416.80
8.3.140.0030.00516.67
8.3.130.0120.00617.14
8.3.120.0090.00019.10
8.3.110.0030.00620.94
8.3.100.0060.00324.06
8.3.90.0080.00026.77
8.3.80.0080.00418.41
8.3.70.0090.00618.55
8.3.60.0110.00718.39
8.3.50.0070.00718.77
8.3.40.0130.00721.67
8.3.30.0130.00621.15
8.3.20.0160.00323.73
8.3.10.0070.01123.95
8.3.00.0100.00620.97
8.2.290.0150.00417.54
8.2.280.0140.00620.55
8.2.270.0040.00417.26
8.2.260.0120.00617.44
8.2.250.0000.00818.64
8.2.240.0060.00318.99
8.2.230.0000.00822.58
8.2.220.0090.00937.54
8.2.210.0080.00026.77
8.2.200.0060.00318.54
8.2.190.0180.00016.63
8.2.180.0110.00419.04
8.2.170.0130.00321.04
8.2.160.0100.01022.13
8.2.150.0170.00321.08
8.2.140.0160.00322.47
8.2.130.0130.00722.62
8.2.120.0130.00721.38
8.2.110.0100.01021.33
8.2.100.0120.00321.33
8.2.90.0080.00821.11
8.2.80.0180.00021.38
8.2.70.0000.01520.69
8.2.60.0000.01420.98
8.2.50.0090.00521.11
8.2.40.0120.00620.98
8.2.30.0180.00420.81
8.2.20.0070.00720.72
8.2.10.0110.01120.66
8.2.00.0130.00720.68
8.1.330.0100.00916.54
8.1.320.0120.00718.29
8.1.310.0110.00716.84
8.1.300.0040.00416.63
8.1.290.0060.00318.88
8.1.280.0070.00725.92
8.1.270.0090.00924.22
8.1.260.0120.00624.15
8.1.250.0070.01124.16
8.1.240.0100.01020.53
8.1.230.0190.00020.39
8.1.220.0060.01320.89
8.1.210.0130.00620.66
8.1.200.0160.00320.90
8.1.190.0070.00720.59
8.1.180.0110.01120.34
8.1.170.0090.00620.73
8.1.160.0140.00720.60
8.1.150.0100.01020.71
8.1.140.0080.01120.78
8.1.130.0100.00720.74
8.1.120.0040.01220.38
8.1.110.0140.00720.40
8.1.100.0090.00921.65
8.1.90.0150.01220.58
8.1.80.0120.00621.59
8.1.70.0130.00320.79
8.1.60.0040.01220.58
8.1.50.0090.00620.62
8.1.40.0060.00920.71
8.1.30.0070.00720.89
8.1.20.0120.00321.82
8.1.10.0150.00020.85
8.1.00.0090.00620.56

preferences:
64.42 ms | 403 KiB | 5 Q