3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<XML <?xml version="1.0" encoding="utf-8"?> <touhou xmlns:windows="http://example.com/windows" xmlns:alt="http://example.com/alt"> <game> <title lang="en">Highly Responsive to Prayers</title> <title lang="jp">東方靈異伝</title> </game> <game> <title lang="en">Story of Eastern Wonderland</title> <title lang="jp" alt:romaji="Tōhō Fūmaroku">東方封魔録</title> </game> <windows:game> <title lang="en">Embodiment of Scarlet Devil</title> <title lang="jp">東方紅魔郷</title> </windows:game> <windows:game> <title lang="en">Perfect Cherry Blossom</title> <title lang="jp">東方妖々夢</title> </windows:game> </touhou> XML; $result = json_decode(json_encode(new SimpleXMLElement($xml)), true); var_dump($result);
Output for git.master, git.master_jit, rfc.property-hooks
array(1) { ["game"]=> array(2) { [0]=> array(1) { ["title"]=> array(2) { [0]=> string(28) "Highly Responsive to Prayers" [1]=> string(15) "東方靈異伝" } } [1]=> array(1) { ["title"]=> array(2) { [0]=> string(27) "Story of Eastern Wonderland" [1]=> string(15) "東方封魔録" } } } }

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