3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); function xml_encode($mixed, $DOMDocument=null) { if (is_null($DOMDocument)) { $DOMDocument =new DOMDocument; $DOMDocument->formatOutput = true; xml_encode($mixed, $DOMDocument); echo $DOMDocument->saveXML(); } else { if (is_array($mixed)) { $node = $DOMDocument->createElement('urlset', 'hello'); $DOMDocument->appendChild($node); } } } $data = array(); for ($x = 0; $x <= 10; $x++) { $data['urlset'][] = array( 'loc' => 'http://www.example.com/user', 'lastmod' => 'YYYY-MM-DD', 'changefreq' => 'monthly', 'priority' => 0.5 ); } header('Content-Type: application/xml'); echo xml_encode($data);
Output for git.master, git.master_jit, rfc.property-hooks
<?xml version="1.0"?> <urlset>hello</urlset>

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:
57.94 ms | 401 KiB | 8 Q