3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = "<root><node>stuff<node>stuff</node><anothernode>more stuff</anothernode></node></root>"; $xml = simplexml_load_string($xml); var_dump(json_encode($xml));

preferences:
38.34 ms | 402 KiB | 5 Q