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( (new \ReflectionClass($symbol))->getMethods(), function (\ReflectionProperty $property) { return $property->isStatic(); } ) ); }, array_merge(get_declared_classes(), get_declared_traits()) ) ));
based on ZPqkj
Output for 7.0.20, 7.1.5 - 7.2.0
Fatal error: Uncaught TypeError: Argument 1 passed to {closure}() must be an instance of ReflectionProperty, instance of ReflectionMethod given in /in/aCs3f:18 Stack trace: #0 [internal function]: {closure}(Object(ReflectionMethod)) #1 /in/aCs3f(20): array_filter(Array, Object(Closure)) #2 [internal function]: {closure}('Exception') #3 /in/aCs3f(24): array_map(Object(Closure), Array) #4 {main} thrown in /in/aCs3f on line 18
Process exited with code 255.
Output for 7.0.0 - 7.0.6, 7.1.0
Fatal error: Uncaught TypeError: Argument 1 passed to {closure}() must be an instance of ReflectionProperty, instance of ReflectionMethod given in /in/aCs3f:18 Stack trace: #0 [internal function]: {closure}(Object(ReflectionMethod)) #1 /in/aCs3f(20): array_filter(Array, Object(Closure)) #2 [internal function]: {closure}('Exception') #3 /in/aCs3f(23): array_map(Object(Closure), Array) #4 {main} thrown in /in/aCs3f on line 18
Process exited with code 255.
Output for 5.6.8 - 5.6.28
Catchable fatal error: Argument 1 passed to {closure}() must be an instance of ReflectionProperty, instance of ReflectionMethod given in /in/aCs3f on line 18
Process exited with code 255.
Output for 5.4.11 - 5.5.35
Parse error: syntax error, unexpected '.' in /in/aCs3f on line 10
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected '[', expecting ')' in /in/aCs3f on line 9
Process exited with code 255.