3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $xmlstr = " <employee> <employeename>test</employeename> <employeeaddress>test123</employeeaddress> <SSN>12343456</SSN> <company>TOPXML</company> </employee> "; $dom = new \DOMDocument; $dom->loadXML($xmlstr); $node = $dom->children[1]; $node->normalize(); echo $dom->C14N();echo "\n\n"; echo $node->C14N(); ?>
based on 4WSZW
Output for 7.0.28 - 7.3.0rc3
Notice: Undefined property: DOMDocument::$children in /in/kTFuY on line 14 Fatal error: Uncaught Error: Call to a member function normalize() on null in /in/kTFuY:15 Stack trace: #0 {main} thrown in /in/kTFuY on line 15
Process exited with code 255.
Output for 5.6.38
Notice: Undefined property: DOMDocument::$children in /in/kTFuY on line 14 Fatal error: Call to a member function normalize() on null in /in/kTFuY on line 15
Process exited with code 255.