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> <duck>test1</duck> <duck a="b">test2</duck> <duck>test3</duck> </ducks> <cereal>2</cereal> </Formula> </root>'; $xml = simplexml_load_string($s); $arr = (array) $xml; $newArr = (array)$arr['Formula']; $it = new SimpleXMLIterator($s); var_dump($it->current());
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Iterator not initialized or already consumed in /in/ABTaV:22 Stack trace: #0 /in/ABTaV(22): SimpleXMLElement->current() #1 {main} thrown in /in/ABTaV on line 22
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.23 ms | 401 KiB | 8 Q