3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $page = '<div class="showtime-bg"> <div style="float:left;"> <a href="javascript:getinfo(295, 1)"><img src="images/main/movies/movie.jpg" height="180" alt=""></a></div>'; $dom = new DOMDocument(); $dom->loadHTML($page); $xpath = new DOMXPath($dom); echo $xpath->query("//div[@class='showtime-bg']/img/@src");
based on 5R82b
Output for 7.1.0 - 7.2.0
Recoverable fatal error: Object of class DOMNodeList could not be converted to string in /in/8MQnG on line 10
Process exited with code 255.
Output for 5.3.20 - 7.0.20
Catchable fatal error: Object of class DOMNodeList could not be converted to string in /in/8MQnG on line 10
Process exited with code 255.