3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { function method($a = UndefinedClass::UNDEFINED) { } } $rp = new ReflectionParameter(['Test', 'method'], 'a'); try { $val = $rp->getDefaultValue(); } catch (Error $ex) { var_dump($ex); }

preferences:
55.86 ms | 402 KiB | 5 Q