3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = new DOMDocument(); if ($xml->load("http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml")){ $root = $xml->documentElement; $date = $items->item(1)->getAttribute('time'); $items = $root->getElementsByTagName('Cube'); foreach ($items as $item){ echo $item->getAttribute('currency'); } }
Output for git.master, git.master_jit, rfc.property-hooks
Warning: DOMDocument::load(): php_network_getaddresses: getaddrinfo for www.ecb.europa.eu failed: System error in /in/JbXQI on line 3 Warning: DOMDocument::load(http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml): Failed to open stream: php_network_getaddresses: getaddrinfo for www.ecb.europa.eu failed: System error in /in/JbXQI on line 3 Warning: DOMDocument::load(): I/O warning : failed to load external entity "http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml" in /in/JbXQI on line 3

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