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->childNodes[1]; $node->normalize(); echo $dom->C14N();echo "\n\n"; echo $node->C14N(); ?>
based on kTFuY
Output for 7.0.28 - 7.3.0rc3
Fatal error: Uncaught Error: Call to a member function normalize() on null in /in/Ad37Q:15 Stack trace: #0 {main} thrown in /in/Ad37Q on line 15
Process exited with code 255.
Output for 5.6.38
Fatal error: Call to a member function normalize() on null in /in/Ad37Q on line 15
Process exited with code 255.