3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = new SimpleXMLElement('<root/>'); $xml->addChild('a', 1); $xml->addChild('a', 2); $xml->addChild('b'); print_r($xml);

preferences:
30.81 ms | 402 KiB | 5 Q