3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class simple2 extends SimpleXMLElement { } $xml = new simple2('<data/>'); $name="header and body"; $value="This & That"; $xml->$name=$value; $xml->$name->addChild("aaa", "bbb"); //$xml->addChild ($name, $value); print_r($xml);
based on OuefI