3v4l.org

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