3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xmlstr = '<za-lord> <orderid>dresden1234</orderid> <customer>toot-toot</customer> <pizza> <sauce>marinara</sauce> <crust>thin</crust> <toppings> <cheese>extra</cheese> <veg> <onions>yes</onions> <peppers>extra</peppers> <olives>no</olives> </veg> <meat> <groundbeef>yes</groundbeef> <ham>no</ham> <sausage>no</sausage> </meat> </toppings> </pizza> </za-lord> '; function list_nodes($sxi) { for($sxi->rewind(); $sxi->valid(); $sxi->next() ) { if ($sxi->hasChildren()) { list_nodes($sxi->current()); } else { echo $sxi->key() . " = " . $sxi->current() . "\n"; } } } $sxi = new SimpleXMLIterator($xmlstr); list_nodes($sxi);
Output for git.master, git.master_jit, rfc.property-hooks
orderid = dresden1234 customer = toot-toot sauce = marinara crust = thin cheese = extra onions = yes peppers = extra olives = no groundbeef = yes ham = no sausage = no

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:
127.49 ms | 405 KiB | 5 Q