3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $extension = new ReflectionExtension("Reflection"); print_r($extension->getClassNames());
Output for 7.1.0
Array ( [0] => ReflectionException [1] => Reflection [2] => Reflector [3] => ReflectionFunctionAbstract [4] => ReflectionFunction [5] => ReflectionGenerator [6] => ReflectionParameter [7] => ReflectionType [8] => ReflectionNamedType [9] => ReflectionMethod [10] => ReflectionClass [11] => ReflectionObject [12] => ReflectionProperty [13] => ReflectionClassConstant [14] => ReflectionExtension [15] => ReflectionZendExtension )
Output for 7.0.0 - 7.0.14
Array ( [0] => ReflectionException [1] => Reflection [2] => Reflector [3] => ReflectionFunctionAbstract [4] => ReflectionFunction [5] => ReflectionGenerator [6] => ReflectionParameter [7] => ReflectionType [8] => ReflectionMethod [9] => ReflectionClass [10] => ReflectionObject [11] => ReflectionProperty [12] => ReflectionExtension [13] => ReflectionZendExtension )
Output for hhvm-3.10.0 - 3.12.0
Array ( )
Output for 5.4.0 - 5.6.28
Array ( [0] => ReflectionException [1] => Reflection [2] => Reflector [3] => ReflectionFunctionAbstract [4] => ReflectionFunction [5] => ReflectionParameter [6] => ReflectionMethod [7] => ReflectionClass [8] => ReflectionObject [9] => ReflectionProperty [10] => ReflectionExtension [11] => ReflectionZendExtension )
Output for 5.2.0 - 5.3.29
Array ( [0] => ReflectionException [1] => Reflection [2] => Reflector [3] => ReflectionFunctionAbstract [4] => ReflectionFunction [5] => ReflectionParameter [6] => ReflectionMethod [7] => ReflectionClass [8] => ReflectionObject [9] => ReflectionProperty [10] => ReflectionExtension )
Output for 5.1.2 - 5.1.6
Array ( [0] => ReflectionException [1] => Reflection [2] => Reflector [3] => ReflectionFunction [4] => ReflectionParameter [5] => ReflectionMethod [6] => ReflectionClass [7] => ReflectionObject [8] => ReflectionProperty [9] => ReflectionExtension )
Output for 5.0.3 - 5.1.1
Fatal error: Uncaught exception 'ReflectionException' with message 'Extension Reflection does not exist' in /in/VXjKl:2 Stack trace: #0 /in/VXjKl(2): ReflectionExtension->__construct('Reflection') #1 {main} thrown in /in/VXjKl on line 2
Process exited with code 255.
Output for 5.0.0 - 5.0.2
Fatal error: Uncaught exception 'ReflectionException' with message 'Extension Reflection does not exist' in /in/VXjKl:2 Stack trace: #0 {main} thrown in /in/VXjKl on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: reflectionextension in /in/VXjKl on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: reflectionextension in /in/VXjKl on line 2