3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { private static $bar; } var_dump(array_merge( [], ...array_map( function ($symbol) { return array_map( function (\ReflectionProperty $property) { return ($property->getDeclaringClass()->getName()) . '::$' . $property->getName(); }, array_filter( (\ReflectionClass($symbol))->getMethods(), function (\ReflectionProperty $property) { return $property->isStatic(); } ) ); }, array_merge(get_declared_classes(), get_declared_traits()) ) ));
Output for 7.0.20, 7.1.5 - 7.2.0
Fatal error: Uncaught Error: Call to undefined function ReflectionClass() in /in/ZPqkj:17 Stack trace: #0 [internal function]: {closure}('stdClass') #1 /in/ZPqkj(24): array_map(Object(Closure), Array) #2 {main} thrown in /in/ZPqkj on line 17
Process exited with code 255.
Output for 7.0.0 - 7.0.6, 7.1.0
Fatal error: Uncaught Error: Call to undefined function ReflectionClass() in /in/ZPqkj:17 Stack trace: #0 [internal function]: {closure}('stdClass') #1 /in/ZPqkj(23): array_map(Object(Closure), Array) #2 {main} thrown in /in/ZPqkj on line 17
Process exited with code 255.
Output for 5.6.8 - 5.6.28
Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR) in /in/ZPqkj on line 17
Process exited with code 255.
Output for 5.4.11 - 5.5.35
Parse error: syntax error, unexpected '.' in /in/ZPqkj on line 10
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected '[', expecting ')' in /in/ZPqkj on line 9
Process exited with code 255.