3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xmlstr = '<za-lord xmlns:a="http://example.org/ns" xmlns:t="http://example.org/test"> <orderid>dresden1234</orderid> <customer>toot-toot</customer> <pizza> <sauce>marinara</sauce> <crust>thin</crust> <toppings> <cheese>extra</cheese> <veg> <a:onions>yes</a:onions> <a:peppers>extra</a:peppers> <a:olives>no</a:olives> </veg> <meat> <t:groundbeef>yes</t:groundbeef> <a:ham>no</a:ham> <sausage>no</sausage> </meat> </toppings> </pizza> </za-lord> '; function list_children($node, $names) { $children = false; foreach ($names as $name) { if (count($node->children($name))) { $children = true; foreach ($node->children($name) as $child) { list_children($child, $names); } } } if (!$children) { echo $node->getName() . " = $node\n"; } } $xml = new SimpleXMLElement($xmlstr); list_children($xml, array_merge(array(''), $xml->getNamespaces(true)));
Output for git.master_jit, git.master, rfc.property-hooks
orderid = dresden1234 customer = toot-toot sauce = marinara crust = thin cheese = extra onions = yes peppers = extra olives = no sausage = no ham = no groundbeef = yes

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