3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function foo(bar $a = null, $b) { } $r = new ReflectionParameter('foo', 0); try { $r->getClass(); } catch (\Exception $e) { echo $e->getMessage(); } var_dump($r->isNullAllowed());
based on L8mhS
Output for 7.0.0 - 7.2.0
Class bar does not exist Fatal error: Uncaught Error: Call to undefined method ReflectionParameter::isNullAllowed() in /in/uTJ1O:15 Stack trace: #0 {main} thrown in /in/uTJ1O on line 15
Process exited with code 255.
Output for 5.3.19 - 5.6.28
Class bar does not exist Fatal error: Call to undefined method ReflectionParameter::isNullAllowed() in /in/uTJ1O on line 15
Process exited with code 255.