3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = '<root> <Formula> <formulaname attr="1.0">Basic</formulaname> <movespeed>1</movespeed> <box>4</box> <chicken>3</chicken> <ducks>1</ducks> <cereal>2</cereal> </Formula> </root>'; $xml = simplexml_load_string($s); $arr = (array) $xml; $newArr = (array)$arr['Formula']; var_dump($newArr['formulaname'], $arr['Formula']->formulaname);
Output for git.master, git.master_jit, rfc.property-hooks
string(5) "Basic" object(SimpleXMLElement)#3 (2) { ["@attributes"]=> array(1) { ["attr"]=> string(3) "1.0" } [0]=> string(5) "Basic" }

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