3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $doc = new DOMDocument; $doc->loadXML('<?xml version="1.0" encoding="UTF-8"?> <c:tellervo xmlns:c="http://www.tellervo.org/schema/1.0" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:tridas="http://www.tridas.org/1.2.2"> <c:request type="create"> <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> </c:request> </c:tellervo> '); $children = $doc->documentElement->childNodes; foreach($children as $child) { if($child->nodeType != XML_ELEMENT_NODE) continue; $firebug->log($child->nodeName, "child nodeName"); }
Output for 7.0.5 - 7.1.0
Notice: Undefined variable: firebug in /in/GMsL8 on line 17 Fatal error: Uncaught Error: Call to a member function log() on null in /in/GMsL8:17 Stack trace: #0 {main} thrown in /in/GMsL8 on line 17
Process exited with code 255.
Output for 7.0.0 - 7.0.4
Notice: Undefined variable: firebug in /in/GMsL8 on line 17 Fatal error: Uncaught Error: Call to a member function log() on unknown in /in/GMsL8:17 Stack trace: #0 {main} thrown in /in/GMsL8 on line 17
Process exited with code 255.
Output for 5.6.0 - 5.6.28
Notice: Undefined variable: firebug in /in/GMsL8 on line 17 Fatal error: Call to a member function log() on null in /in/GMsL8 on line 17
Process exited with code 255.
Output for 5.0.4 - 5.5.38
Notice: Undefined variable: firebug in /in/GMsL8 on line 17 Fatal error: Call to a member function log() on a non-object in /in/GMsL8 on line 17
Process exited with code 255.
Output for 5.0.0 - 5.0.3
Notice: Undefined variable: firebug in /in/GMsL8 on line 17 Fatal error: Call to a member function log() on a non-object in /in/GMsL8 on line 17
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: domdocument in /in/GMsL8 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/GMsL8 on line 2