3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $dom = new domDocument; libxml_use_internal_errors(true); $dom->loadHTMLFile($url); $classname="game_description_snippet"; $finder = new DomXPath($dom); $spaner = $finder->query("//*[contains(@class, '$classname')]"); foreach ($spaner as $spane) { //This part returns: Fatal error: Call to undefined method DOMElement::item() $mo = $spane->item(0)->nodeValue; echo $mo; } ?>
Output for 5.3.21 - 7.2.6
Notice: Undefined variable: url in /in/fbdl3 on line 5 Warning: DOMDocument::loadHTMLFile(): Empty string supplied as input in /in/fbdl3 on line 5