3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $xml = new SimpleXMLElement('<data/>'); $name="header"; $value="This & That"; $xml->addChild ($name, $value); print_r($xml);
based on h3cZH
Output for 5.3.19 - 7.2.0
Warning: SimpleXMLElement::addChild(): unterminated entity reference That in /in/5vcMC on line 6 SimpleXMLElement Object ( [header] => SimpleXMLElement Object ( ) )