3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<HTML <div>data</div> HTML; $doc = new DOMDocument; $doc->loadHTML($html); var_dump($doc->getElementsByTagName('div')->item(0)->textContent);

preferences:
57.01 ms | 402 KiB | 5 Q