3v4l.org

run code in 300+ PHP versions simultaneously
<?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 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Fatal error: Uncaught Error: Call to undefined function ReflectionClass() in /in/ZPqkj:17 Stack trace: #0 [internal function]: {closure}('InternalIterato...') #1 /in/ZPqkj(10): array_map(Object(Closure), Array) #2 {main} thrown in /in/ZPqkj on line 17
Process exited with code 255.
Output for 7.0.19 - 7.0.33, 7.1.5 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28
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.18, 7.1.0 - 7.1.4
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.0 - 5.6.40
Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR) in /in/ZPqkj on line 17
Process exited with code 255.
Output for 5.5.0 - 5.5.38
Parse error: syntax error, unexpected '.' in /in/ZPqkj on line 10
Process exited with code 255.

preferences:
250.12 ms | 401 KiB | 327 Q