3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $dom = new DOMDocument(); $rss = $dom->appendChild($dom->createElement('RSS')); $rss->setAttributeNS( 'http://www.w3.org/2000/xmlns/', 'xmlns:atom', 'http://www.w3.org/2005/Atom' ); echo $dom->saveXml();
Output for 5.0.0 - 7.1.0
<?xml version="1.0"?> <RSS xmlns:atom="http://www.w3.org/2005/Atom"/>
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: domdocument in /in/dCUv9 on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: domdocument in /in/dCUv9 on line 3