3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $doc = new DOMDocument; $doc->loadXML('<c:request type="create"> <tridas:object> <tridas:title>ppp</tridas:title> <tridas:type normalStd="Tellervo" normalId="1" normal="Site" /> <tridas:genericField name="tellervo.objectLabCode">ppp</tridas:genericField> </tridas:object> </c:request> '); $element = $doc->documentElement; echo $element->nodeName, ' / ', $element->tagName;
Output for 5.0.0 - 7.1.0
Warning: DOMDocument::loadXML(): Namespace prefix c on request is not defined in Entity, line: 1 in /in/UYpfL on line 11 Warning: DOMDocument::loadXML(): Namespace prefix tridas on object is not defined in Entity, line: 2 in /in/UYpfL on line 11 Warning: DOMDocument::loadXML(): Namespace prefix tridas on title is not defined in Entity, line: 3 in /in/UYpfL on line 11 Warning: DOMDocument::loadXML(): Namespace prefix tridas on type is not defined in Entity, line: 4 in /in/UYpfL on line 11 Warning: DOMDocument::loadXML(): Namespace prefix tridas on genericField is not defined in Entity, line: 5 in /in/UYpfL on line 11 c:request / c:request
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: domdocument in /in/UYpfL 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/UYpfL on line 2