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; $xml = simplexml_load_string($xml_string); $xml->registerXPathNamespace('c', 'http://www.ecb.int/vocabulary/2002-08-01/eurofxref'); $result = $xml->xpath('//c:Cube[@time"]'); echo count($result);
Output for git.master, git.master_jit
Warning: SimpleXMLElement::xpath(): Invalid predicate in /in/dK9f8 on line 23 Warning: SimpleXMLElement::xpath(): xmlXPathEval: evaluation failed in /in/dK9f8 on line 23 Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, bool given in /in/dK9f8:25 Stack trace: #0 {main} thrown in /in/dK9f8 on line 25
Process exited with code 255.
Output for rfc.property-hooks
Warning: SimpleXMLElement::xpath(): Invalid predicate in /in/dK9f8 on line 23 Warning: SimpleXMLElement::xpath(): xmlXPathEval: evaluation failed in /in/dK9f8 on line 23 Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, false given in /in/dK9f8:25 Stack trace: #0 {main} thrown in /in/dK9f8 on line 25
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:
46.85 ms | 401 KiB | 8 Q