3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $doc = new DOMDocument; $doc->loadXML('<!-- GroupComment --> <key1>KeyValue</key1> <key2 value="key2value"/> <group1> <group1Key>Group1KeyValue</group1Key> </group1>'); $element = $doc->documentElement; echo $element->nodeName, ' / ', $element->tagName;
Output for 5.0.0 - 5.6.28, 7.0.0 - 7.1.0
Warning: DOMDocument::loadXML(): Extra content at the end of the document in Entity, line: 3 in /in/lssZZ on line 8 Notice: Trying to get property of non-object in /in/lssZZ on line 10 / Notice: Trying to get property of non-object in /in/lssZZ on line 10
Output for hhvm-3.12.0
Warning: Extra content at the end of the document in Entity, line: 3 Notice: Cannot access property on non-object in /in/lssZZ on line 10 / Notice: Cannot access property on non-object in /in/lssZZ on line 10
Output for hhvm-3.10.0

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