3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml=simplexml_load_string(<<<XML <element> <feed id=" 9 "> <title>test</title> <table>feeds</table> <link/> <feed_type>API</feed_type> <affiliate/> <mwst>ja</mwst> <tld>DE</tld> <query/> </feed> </element> XML ); function deleteNode($feed_id) { global $xml; $node=$xml->xpath('//feed[@id=" '.$feed_id.' "]'); $node=dom_import_simplexml($node[0]); $parent=$node->parentNode; $parent->removeChild($node); $xml=simplexml_import_dom($parent->ownerDocument); } echo $xml->asXML(); echo "\n"; deleteNode("9"); echo $xml->asXML();
Output for git.master, git.master_jit, rfc.property-hooks
<?xml version="1.0"?> <element> <feed id=" 9 "> <title>test</title> <table>feeds</table> <link/> <feed_type>API</feed_type> <affiliate/> <mwst>ja</mwst> <tld>DE</tld> <query/> </feed> </element> <?xml version="1.0"?> <element> </element>

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

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


preferences:
50.66 ms | 402 KiB | 8 Q