3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<HTML <div class="d-xl-none"> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar-top-menu"> <i class="icon-grid3"></i> </button> </div> <div class='class_1'> <span>test</span> </div> HTML; $dom = new DOMDocument; $dom->loadXML("<root>{$html}</root>"); $xpath = new DOMXPath($dom); echo $dom->saveHTML($xpath->query('//div[@class="d-xl-none"]/*')[0]); echo PHP_EOL, '===========================', PHP_EOL; echo $dom->saveHTML($xpath->query('//div[@class="class_1"]/*')[0]);
Output for git.master, git.master_jit, rfc.property-hooks
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar-top-menu"> <i class="icon-grid3"></i> </button> =========================== <span>test</span>

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:
71.26 ms | 401 KiB | 8 Q