3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php ob_start(); ?> <div> <h1>Example Domain</h1> <p>This domain is established to be used for illustrative examples in documents. You may use this domain in examples without prior coordination or asking for permission.</p> <p><a href="http://www.iana.org/domains/example">More information...</a></p> </div> <?php $c = ob_get_clean(); if( ! class_exists('DOMDocument') ) exit("DOMDocument not here"); $doc = new DOMDocument(); $doc->loadHTML("<html><body>Test<br></body></html>"); print_r( $doc->childNodes->item(0)->nodeValue ); echo PHP_EOL.PHP_EOL; $doc->loadHTML($c); print_r( $doc->childNodes->item(0)->nodeValue );
based on WRYiO
Output for 5.6.0 - 5.6.30, hhvm-3.18.5 - 3.22.0, 7.1.0 - 7.3.0beta1