3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = ' <html> <head> <title>DOMDocument test-case</title> </head> <body> <div class="dummy-container"> <h1 _ngcontent-c0="" class="br-hdng"><span _ngcontent-c0="" class="pr dib">hair fall shamboo<!----></span></h1> </div> </body>'; $dom = new DOMDocument; $oldSetting = libxml_use_internal_errors(true); $dom->loadHTML( $html ); libxml_use_internal_errors($oldSetting); $xpath = new DOMXPath( $dom ); $title = $xpath->query( '//h1[@class="br-hdng"]/span' )->item( 0 )->nodeValue; echo $title;
Output for git.master, git.master_jit, rfc.property-hooks
hair fall shamboo

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:
52.06 ms | 405 KiB | 5 Q