3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = new SimpleXMLElement('<xml/>'); for ($i = 1; $i <= 8; ++$i) { $track = $xml->addChild('track'); $track->addChild('path', "song$i.mp3"); $track->addChild('title', "Track $i - Track Title"); } Header('Content-type: text/xml'); print($xml->asXML());
Output for git.master, git.master_jit, rfc.property-hooks
<?xml version="1.0"?> <xml><track><path>song1.mp3</path><title>Track 1 - Track Title</title></track><track><path>song2.mp3</path><title>Track 2 - Track Title</title></track><track><path>song3.mp3</path><title>Track 3 - Track Title</title></track><track><path>song4.mp3</path><title>Track 4 - Track Title</title></track><track><path>song5.mp3</path><title>Track 5 - Track Title</title></track><track><path>song6.mp3</path><title>Track 6 - Track Title</title></track><track><path>song7.mp3</path><title>Track 7 - Track Title</title></track><track><path>song8.mp3</path><title>Track 8 - Track Title</title></track></xml>

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:
45.13 ms | 402 KiB | 8 Q