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();
Output for git.master_jit, git.master, rfc.property-hooks
<p>This is a test buton.</p>

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
25.68 ms | 405 KiB | 5 Q