3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<XML <buses> <DpsBus> <Line>Blue</Line> <Destination>North</Destination> <Time>5 min</Time> </DpsBus> <DpsBus> <Line>Green</Line> <Destination>East</Destination> <Time>7 min</Time> </DpsBus> <DpsBus> <Line>Blue</Line> <Destination>North</Destination> <Time>9 min</Time> </DpsBus> </buses> XML; $data = simplexml_load_string($xml); var_dump($data);
Output for git.master, git.master_jit, rfc.property-hooks
object(SimpleXMLElement)#1 (1) { ["DpsBus"]=> array(3) { [0]=> object(SimpleXMLElement)#2 (3) { ["Line"]=> string(4) "Blue" ["Destination"]=> string(5) "North" ["Time"]=> string(5) "5 min" } [1]=> object(SimpleXMLElement)#3 (3) { ["Line"]=> string(5) "Green" ["Destination"]=> string(4) "East" ["Time"]=> string(5) "7 min" } [2]=> object(SimpleXMLElement)#4 (3) { ["Line"]=> string(4) "Blue" ["Destination"]=> string(5) "North" ["Time"]=> string(5) "9 min" } } }

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:
120.69 ms | 402 KiB | 8 Q