3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $doc = new DOMDocument(); $doc->loadXML('<root xmlns:x="x"><a/><x:a/></root>'); $list = $doc->getElementsByTagNameNS('', 'a'); echo $list->length;
Output for 7.0.15 - 7.0.20, 7.1.1 - 7.2.0
1
Output for 5.0.0 - 5.6.30, 7.0.0 - 7.0.14, 7.1.0
0
Output for hhvm-3.11.1 - 3.17.3
2
Output for hhvm-3.10.1

Process exited with code 137.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: domdocument in /in/tv0Ci on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: domdocument in /in/tv0Ci on line 3