3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function debugSousBalises($p_oBalise){ for($i = 0; $i < $p_oBalise->childNodes->length; ++$i){ $oNode = $p_oBalise->childNodes->item($i); //var_dump($oNode); switch(get_class($oNode)){ case 'DOMText': echo $oNode->wholeText; break; case 'DOMElement': echo $oNode->tagName; break; default: echo get_class($oNode).' pas encore pris en compte'; } } } $xml = new DOMDocument(); $xml->loadXml('<balise> <ata>2013-08-20T17:13:25</ata> <atd>2013-08-20T17:15:03</atd> <callSequence>1</callSequence> <actualCallSequence>2</actualCallSequence> <clauseInfo> <clause>LIV_CFM</clause> <description>Conforme</description> </clauseInfo> </balise>'); debugSousBalises($xml->documentElement); ?>
based on 2gHde
Output for 5.2.3 - 7.2.0
ata atd callSequence actualCallSequence clauseInfo
Output for 5.0.0 - 5.2.2
ata atd callSequence actualCallSequence clauseInfo
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: domdocument in /in/VmfC7 on line 22
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: domdocument in /in/VmfC7 on line 22