3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $reflection = new \ReflectionClass('\DOMNodeList'); $property = $reflection->setProperty('length'); $property->setValue(1);
based on mTILs
Output for 7.0.0 - 7.3.0alpha1
Fatal error: Uncaught Error: Call to undefined method ReflectionClass::setProperty() in /in/D8jgj:4 Stack trace: #0 {main} thrown in /in/D8jgj on line 4
Process exited with code 255.
Output for 5.3.0 - 5.6.28
Fatal error: Call to undefined method ReflectionClass::setProperty() in /in/D8jgj on line 4
Process exited with code 255.
Output for 5.0.3 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/D8jgj on line 3 Fatal error: Uncaught exception 'ReflectionException' with message 'Class \DOMNodeList does not exist' in /in/D8jgj:3 Stack trace: #0 /in/D8jgj(3): ReflectionClass->__construct('\DOMNodeList') #1 {main} thrown in /in/D8jgj on line 3
Process exited with code 255.
Output for 5.0.0 - 5.0.2
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/D8jgj on line 3 Fatal error: Uncaught exception 'ReflectionException' with message 'Class \DOMNodeList does not exist' in /in/D8jgj:3 Stack trace: #0 {main} thrown in /in/D8jgj on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/D8jgj on line 3 Fatal error: Cannot instantiate non-existent class: reflectionclass in /in/D8jgj on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/D8jgj on line 3 Fatal error: Cannot instantiate non-existent class: reflectionclass in /in/D8jgj on line 3