3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php <?php $xml = new SimpleXMLElement('<root><elements attr="test"><el>test1</el><el>test2</el><el test_attr="123">test3</el></elements></root>'); print_r(json_decode(json_encode((array) simplexml_load_string($xml)), 1));
Output for 5.3.0 - 5.4.19
Parse error: syntax error, unexpected '<' in /in/WqHAh on line 3
Process exited with code 255.