3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $xmlrequest = new DOMDocument; $xmlrequest->preserveWhiteSpace = false; $xmlrequest->loadXML(<<<XML <?xml version="1.0"?> <request> <APP-ID>166533e56</APP-ID> </request> XML ); $rootNode = $xmlrequest->documentElement; $request_root = $rootNode->getElementsByTagName("request"); foreach($xmldata as $k => $v){ $rootElt = $xmlrequest->createElement('email'); $subNode = $rootNode->appendChild($rootElt); $subrootElt = $xmlrequest->createElement('recipient'); $subsubNode = $subNode->appendChild($subrootElt); $textNode = $xmlrequest->createTextNode(md5(strtolower($v->contacts_emailaddress))); $subsubNode->appendChild($textNode); $subrootElt = $xmlrequest->createElement('list'); $subsub2Node = $subNode->appendChild($subrootElt); $textNode = $xmlrequest->createTextNode($this->list_id); $subsub2Node->appendChild($textNode); $subrootElt = $xmlrequest->createElement('domain'); $subsub3Node = $subNode->appendChild($subrootElt); $textNode = $xmlrequest->createTextNode($v->contacts_domainname); $subsub3Node->appendChild($textNode); } $xmlrequest->formatOutput = true; //$domDoc->save('config.xml'); echo $xmlrequest->saveXML(); /*$xmlrequest .= "</request>".'<br/>';*/ return $xmlrequest; }

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page