3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = new SimpleXMLElement('<a/>'); $a->addChild('c', 'Three & Four'); $a->d = 'Five & Six'; print($a->asXML());
based on VKDv6
Output for 5.1.3 - 7.1.0
Warning: SimpleXMLElement::addChild(): unterminated entity reference Four in /in/fiBQL on line 4 <?xml version="1.0"?> <a><c/><d>Five &amp; Six</d></a>
Output for 5.0.0 - 5.1.2
Fatal error: Call to undefined method SimpleXMLElement::addChild() in /in/fiBQL on line 4
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: simplexmlelement in /in/fiBQL on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: simplexmlelement in /in/fiBQL on line 3