3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a=array( 'notices' => array( 'a','b','c' ) ); $xml = new SimpleXMLElement('<root/>'); array_walk_recursive($a, array ($xml, 'addChild')); //var_dump($xml->nichts->hasChildren()); $b = $xml->nichts->children(); print_r($b->count()); if ($b) { foreach ($b as $c) { //n } }

preferences:
55.62 ms | 402 KiB | 5 Q