- Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.25
- Parse error: syntax error, unexpected ':' in /in/QLgF0 on line 20
Process exited with code 255.
<?php
$xml_string = <<<EOX
<?xml version="1.0" encoding="UTF-8"?>
<gesmes:Envelope xmlns:gesmes="http://www.gesmes.org/xml/2002-08-01" xmlns="http://www.ecb.int/vocabulary/2002-08-01/eurofxref">
<gesmes:subject>Reference rates</gesmes:subject>
<gesmes:Sender>
<gesmes:name>European Central Bank</gesmes:name>
</gesmes:Sender>
<Cube>
<Cube time='2013-08-23'>
<Cube currency='USD' rate='1.3355'/>
<Cube currency='GBP' rate='0.85910'/>
<Cube currency='HUF' rate='298.98'/>
</Cube>
</Cube>
</gesmes:Envelope>
EOX;
$xml = simplexml_load_string(file_get_contents(http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml));
$xml->registerXPathNamespace('c', 'http://www.ecb.int/vocabulary/2002-08-01/eurofxref');
$result = $xml->xpath('//c:Cube[@currency="USD"]');
echo var_dump($result);