3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class A { public function __construct() { } } $r = new ReflectionClass('A'); $r = unserialize(serialize($r)); $a = $r->newInstanceArgs(array());
based on QRGWm
Output for 7.1.0
Fatal error: Uncaught Error: Internal error: Failed to retrieve the reflection object in /in/N5l6Q:9 Stack trace: #0 /in/N5l6Q(9): ReflectionClass->newInstanceArgs(Array) #1 {main} thrown in /in/N5l6Q on line 9
Process exited with code 255.
Output for 5.3.3 - 5.6.28, 7.0.0 - 7.0.14
Fatal error: ReflectionClass::newInstanceArgs(): Internal error: Failed to retrieve the reflection object in /in/N5l6Q on line 9
Process exited with code 255.
Output for hhvm-3.10.0 - 3.12.0
Output for 5.1.3 - 5.3.2
Fatal error: Internal error: Failed to retrieve the reflection object in /in/N5l6Q on line 9
Process exited with code 255.
Output for 5.0.0 - 5.1.2
Fatal error: Call to undefined method ReflectionClass::newInstanceArgs() in /in/N5l6Q on line 9
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/N5l6Q on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/N5l6Q on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/N5l6Q on line 3
Process exited with code 255.