3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $dom = new DOMDocument(); $dom->appendChild($dom->createElement('foo')); var_dump( get_class_vars($dom->documentElement) );
based on Yo946
Output for 5.0.3 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Warning: get_class_vars() expects parameter 1 to be string, object given in /in/iR6Pj on line 7 NULL
Output for 5.0.0 - 5.0.2
Notice: Object of class DOMElement to string conversion in /in/iR6Pj on line 7 bool(false)
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: domdocument in /in/iR6Pj 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/iR6Pj on line 3