3v4l.org

run code in 300+ PHP versions simultaneously
<?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; $tak = file_get_contents('http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml'); $xml = simplexml_load_string($tak); $xml->registerXPathNamespace('c', 'http://www.ecb.int/vocabulary/2002-08-01/eurofxref'); $result = $xml->xpath('//c:Cube[@currency="USD"]'); echo var_dump($result);
Output for git.master, git.master_jit
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo for www.ecb.europa.eu failed: System error in /in/06A9u on line 20 Warning: file_get_contents(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/06A9u on line 20 Fatal error: Uncaught Error: Call to a member function registerXPathNamespace() on bool in /in/06A9u:24 Stack trace: #0 {main} thrown in /in/06A9u on line 24
Process exited with code 255.
Output for rfc.property-hooks
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo for www.ecb.europa.eu failed: System error in /in/06A9u on line 20 Warning: file_get_contents(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/06A9u on line 20 Fatal error: Uncaught Error: Call to a member function registerXPathNamespace() on false in /in/06A9u:24 Stack trace: #0 {main} thrown in /in/06A9u on line 24
Process exited with code 255.

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