3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $doc = new DOMDocument; $doc->loadXML('<tridas:object> <tridas:title>ppp</tridas:title> <tridas:type normalStd="Tellervo" normalId="1" normal="Site"/> <tridas:genericField name="tellervo.objectLabCode">2222</tridas:genericField> </tridas:object> '); $element = $doc->documentElement; echo $element->nodeName, ' / ', $element->tagName;
Output for 5.2.3 - 7.1.0
Warning: DOMDocument::loadXML(): Namespace prefix tridas on object is not defined in Entity, line: 1 in /in/8nS6D on line 5 Warning: DOMDocument::loadXML(): Namespace prefix tridas on title is not defined in Entity, line: 1 in /in/8nS6D on line 5 Warning: DOMDocument::loadXML(): Namespace prefix tridas on type is not defined in Entity, line: 1 in /in/8nS6D on line 5 Warning: DOMDocument::loadXML(): Namespace prefix tridas on genericField is not defined in Entity, line: 1 in /in/8nS6D on line 5 tridas:object / tridas:object
Output for 5.1.3 - 5.2.2
<br /> <b>Warning</b>: DOMDocument::loadXML() [<a href='function.DOMDocument-loadXML'>function.DOMDocument-loadXML</a>]: Namespace prefix tridas on object is not defined in Entity, line: 1 in <b>/in/8nS6D</b> on line <b>5</b><br /> <br /> <b>Warning</b>: DOMDocument::loadXML() [<a href='function.DOMDocument-loadXML'>function.DOMDocument-loadXML</a>]: Namespace prefix tridas on title is not defined in Entity, line: 1 in <b>/in/8nS6D</b> on line <b>5</b><br /> <br /> <b>Warning</b>: DOMDocument::loadXML() [<a href='function.DOMDocument-loadXML'>function.DOMDocument-loadXML</a>]: Namespace prefix tridas on type is not defined in Entity, line: 1 in <b>/in/8nS6D</b> on line <b>5</b><br /> <br /> <b>Warning</b>: DOMDocument::loadXML() [<a href='function.DOMDocument-loadXML'>function.DOMDocument-loadXML</a>]: Namespace prefix tridas on genericField is not defined in Entity, line: 1 in <b>/in/8nS6D</b> on line <b>5</b><br /> tridas:object / tridas:object
Output for 5.0.0 - 5.1.2
<br /> <b>Warning</b>: DOMDocument::loadXML() [<a href='function.loadXML'>function.loadXML</a>]: Namespace prefix tridas on object is not defined in Entity, line: 1 in <b>/in/8nS6D</b> on line <b>5</b><br /> <br /> <b>Warning</b>: DOMDocument::loadXML() [<a href='function.loadXML'>function.loadXML</a>]: Namespace prefix tridas on title is not defined in Entity, line: 1 in <b>/in/8nS6D</b> on line <b>5</b><br /> <br /> <b>Warning</b>: DOMDocument::loadXML() [<a href='function.loadXML'>function.loadXML</a>]: Namespace prefix tridas on type is not defined in Entity, line: 1 in <b>/in/8nS6D</b> on line <b>5</b><br /> <br /> <b>Warning</b>: DOMDocument::loadXML() [<a href='function.loadXML'>function.loadXML</a>]: Namespace prefix tridas on genericField is not defined in Entity, line: 1 in <b>/in/8nS6D</b> on line <b>5</b><br /> tridas:object / tridas:object
Output for 4.3.2 - 4.4.9
<br /> <b>Fatal error</b>: Cannot instantiate non-existent class: domdocument in <b>/in/8nS6D</b> on line <b>2</b><br />
Process exited with code 255.
Output for 4.3.0 - 4.3.1
<br /> <b>Fatal error</b>: Cannot instantiate non-existent class: domdocument in <b>/in/8nS6D</b> on line <b>2</b><br />