3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function foo(bar $a = null, $b) { } $r = new ReflectionParameter('foo', 0); try { $e->getClass(); } catch (\Exception $e) { echo $e->getMessage(); } var_dump($r->getDefaultValue());
based on cFVb5
Output for 7.0.5 - 7.2.0
Notice: Undefined variable: e in /in/muHrA on line 10 Fatal error: Uncaught Error: Call to a member function getClass() on null in /in/muHrA:10 Stack trace: #0 {main} thrown in /in/muHrA on line 10
Process exited with code 255.
Output for 7.0.0 - 7.0.4
Notice: Undefined variable: e in /in/muHrA on line 10 Fatal error: Uncaught Error: Call to a member function getClass() on unknown in /in/muHrA:10 Stack trace: #0 {main} thrown in /in/muHrA on line 10
Process exited with code 255.
Output for 5.6.8 - 5.6.28
Notice: Undefined variable: e in /in/muHrA on line 10 Fatal error: Call to a member function getClass() on null in /in/muHrA on line 10
Process exited with code 255.
Output for 5.3.0 - 5.5.35
Notice: Undefined variable: e in /in/muHrA on line 10 Fatal error: Call to a member function getClass() on a non-object in /in/muHrA on line 10
Process exited with code 255.
Output for 5.0.4 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/muHrA on line 11 Notice: Undefined variable: e in /in/muHrA on line 10 Fatal error: Call to a member function getClass() on a non-object in /in/muHrA on line 10
Process exited with code 255.
Output for 5.0.0 - 5.0.3
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/muHrA on line 11 Notice: Undefined variable: e in /in/muHrA on line 10 Fatal error: Call to a member function getClass() on a non-object in /in/muHrA on line 10
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting ')' in /in/muHrA 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 ')' in /in/muHrA on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `')'' in /in/muHrA on line 3
Process exited with code 255.