3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $doc = new DOMDocument(); $doc->preserveWhiteSpace = true; $e = $doc->createElement('test'); echo $doc->save();
Output for 5.1.0 - 7.1.0
Warning: DOMDocument::save() expects at least 1 parameter, 0 given in /in/mT4Ao on line 6
Output for 5.0.0 - 5.0.5
Warning: DOMDocument::save() expects exactly 1 parameter, 0 given in /in/mT4Ao on line 6
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: domdocument in /in/mT4Ao 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/mT4Ao on line 3