3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dom = new domDocument(); $dom->strictErrorChecking = false; $dom->recover = true; $html = "https://www.wordproject.org/bibles/am/01/1.htm"; $dom->loadHTML($html); $h2 = $dom->getElementsByTagName("h2"); var_dump($h2); foreach($h2 as $element) { echo $element->ownerDocument->saveHTML($element); }

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
187.61 ms | 2632 KiB | 11 Q