3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $x = simplexml_load_string('<a foo="bar"><kid>Joe</kid></a>');$foo = $x['foo'];unset($foo[0]);$kid = $x->kid;$kid[0] = null;header('Content-Type: text/plain');echo $x->asXML();
Output for 5.2.2 - 5.6.28, 7.0.0 - 7.1.0
<?xml version="1.0"?> <a><kid></kid></a>
Output for hhvm-3.10.0 - 3.12.0
<?xml version="1.0"?> <a><kid>Joe</kid></a>
Output for 5.0.0 - 5.2.1
<?xml version="1.0"?> <a foo="bar"><kid></kid></a>
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: simplexml_load_string() in /in/MT92E on line 1
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: simplexml_load_string() in /in/MT92E on line 1
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: simplexml_load_string() in /in/MT92E on line 1