3v4l.org

run code in 300+ PHP versions simultaneously
<?php class SimpleXMLExtended extends SimpleXMLElement { public function addCData($cdata_text) { $node = dom_import_simplexml($this); $no = $node->ownerDocument; $node->appendChild($no->createCDATASection($cdata_text)); } } $oXML = new SimpleXMLExtended('<rss xmlns:g="http://base.google.com/ns/1.0" version="2.0" />'); $oChannel = $oXML->addChild('channel'); $oChannel->addChild('title', 'TEST'); $oProduct = $oChannel->addChild('item'); $oProduct->addChild('product_type', 'used', 'http://base.google.com/ns/1.0'); echo $oXML->asXML();
Output for git.master, git.master_jit, rfc.property-hooks
<?xml version="1.0"?> <rss xmlns:g="http://base.google.com/ns/1.0" version="2.0"><channel><title>TEST</title><item><g:product_type>used</g:product_type></item></channel></rss>

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:
145 ms | 405 KiB | 5 Q