3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = '<h2><span id="History"></span><span class="mw-headline" id="History">History</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Adamantina&amp;veaction=edit&amp;section=1" class="mw-editsection-visualeditor" title="Editar secção: History">editar</a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Adamantina&amp;action=edit&amp;section=1" title="Editar secção: History">editar código-fonte</a><span class="mw-editsection-bracket">]</span></span></h2>'; $d = new DOMDocument; libxml_use_internal_errors(true); $d->loadHTML($html); $domxpath = new DOMXPath($d); $paragraph = $domxpath->query('//h2/*[contains(text(), "History")]'); var_dump($paragraph->length); if ($paragraph->length > 0) { echo "Results!"; } else { echo "Not contained"; }
Output for git.master, git.master_jit, rfc.property-hooks
int(1) Results!

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