3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $xml='<aaa><bbb ccc="ddd"/></aaa>'; $d=new DOMDocument('1.0','utf-8'); $d->loadXML($xml); $x=new DOMXpath($d); $i=$x->query('//bbb'); echo $i->length();
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Call to undefined method DOMNodeList::length() in /in/GoSOI:10 Stack trace: #0 {main} thrown in /in/GoSOI on line 10
Process exited with code 255.
Output for 5.5.0 - 5.6.28
Fatal error: Call to undefined method DOMNodeList::length() in /in/GoSOI on line 10
Process exited with code 255.