3v4l.org

run code in 300+ PHP versions simultaneously
<div class="first-slide"></div> <div class="container"></div> <?php $htmlString = '<html>...</html>';//either generated, or loaded from a file $dom = new DOMDocument; $dom->loadHTML($htmlString);//or loadHTMLFile $divs = $dom->getElementsByTagName('div'); foreach($divs as $div) { if ($div->hasAttribute('class') && strstr($div->getAttribute('class'), 'first-slide')) { //$div ~= <div class='one-two-three'> $div->appendChild( '<div class="wrapper"></div>');//check the docs to see what you can do } } ?>
Output for git.master, git.master_jit, rfc.property-hooks
<div class="first-slide"></div> <div class="container"></div>

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