3v4l.org

run code in 300+ PHP versions simultaneously
<?php $extension = new ReflectionExtension("Reflection"); print_r($extension->getClassNames());
Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Array ( [0] => ReflectionException [1] => Reflection [2] => Reflector [3] => ReflectionFunctionAbstract [4] => ReflectionFunction [5] => ReflectionGenerator [6] => ReflectionParameter [7] => ReflectionType [8] => ReflectionNamedType [9] => ReflectionUnionType [10] => ReflectionIntersectionType [11] => ReflectionMethod [12] => ReflectionClass [13] => ReflectionObject [14] => ReflectionProperty [15] => ReflectionClassConstant [16] => ReflectionExtension [17] => ReflectionZendExtension [18] => ReflectionReference [19] => ReflectionAttribute [20] => ReflectionEnum [21] => ReflectionEnumUnitCase [22] => ReflectionEnumBackedCase [23] => ReflectionFiber )
Output for 8.0.0 - 8.0.30
Array ( [0] => ReflectionException [1] => Reflection [2] => Reflector [3] => ReflectionFunctionAbstract [4] => ReflectionFunction [5] => ReflectionGenerator [6] => ReflectionParameter [7] => ReflectionType [8] => ReflectionNamedType [9] => ReflectionUnionType [10] => ReflectionMethod [11] => ReflectionClass [12] => ReflectionObject [13] => ReflectionProperty [14] => ReflectionClassConstant [15] => ReflectionExtension [16] => ReflectionZendExtension [17] => ReflectionReference [18] => ReflectionAttribute )
Output for 7.4.0 - 7.4.33
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 [16] => ReflectionReference )
Output for 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33
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.33
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 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40
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.2.17, 5.3.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.0.5, 5.1.0 - 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.3.11, 4.4.0 - 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

preferences:
357.7 ms | 401 KiB | 460 Q