3v4l.org

run code in 300+ PHP versions simultaneously
<?php function StartElement($parser, $name, $attrs) { if (!empty($attrs['RATE'])) { echo "1&euro;=".$attrs['RATE']." ".$attrs['CURRENCY']."<br />"; } } $xml_parser= xml_parser_create(); xml_set_element_handler($xml_parser, "StartElement", ""); // for the following command you will need file_get_contents (PHP >= 4.3.0) // and the config option allow_url_fopen=On (default) xml_parse($xml_parser, file_get_contents ("http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml")); xml_parser_free($xml_parser); ?>

preferences:
55.76 ms | 402 KiB | 5 Q