3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $xml_header = "<?xml version='1.0' encoding='utf-8'?><xml/>"; $xml = new SimpleXMLElement($xml_header); $xml->addChild("test","a & b"); echo $xml->asXml();
Output for 5.6.28 - 7.1.0
Warning: SimpleXMLElement::addChild(): unterminated entity reference b in /in/iRQWt on line 5 <?xml version="1.0" encoding="utf-8"?> <xml><test/></xml>