3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '<?xml version="1.0"?> <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don\'t forget me this weekend!</body> <recursive> <val>2</val> <val>4</val> </recursive> </note>'; $xml1 = new SimpleXmlIterator($filePath, 0, false); $xml = (array) $xml1; echo $xml['note']['to']; echo $xml['note']['recursive']['val'][0];
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $filePath in /in/2A9q5 on line 16 Deprecated: SimpleXMLElement::__construct(): Passing null to parameter #1 ($data) of type string is deprecated in /in/2A9q5 on line 16 Fatal error: Uncaught Exception: String could not be parsed as XML in /in/2A9q5:16 Stack trace: #0 /in/2A9q5(16): SimpleXMLElement->__construct('', 0, false) #1 {main} thrown in /in/2A9q5 on line 16
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:
56.03 ms | 401 KiB | 8 Q