3v4l.org

run code in 200+ PHP versions simultaneously
<?php class Test { function method($a = UndefinedClass::UNDEFINED) { } } $rp = new ReflectionParameter(['Test', 'method'], 'a'); $val = $rp->getDefaultValue();
based on X8gXu
Output for 7.3.0 - 7.3.1
Fatal error: Uncaught Error: Class 'UndefinedClass' not found in /in/EEQFI:11 Stack trace: #0 /in/EEQFI(11): ReflectionParameter->getDefaultValue() #1 {main} thrown in /in/EEQFI on line 11
Process exited with code 255.
Output for 5.5.0 - 7.2.13
Fatal error: Class 'UndefinedClass' not found in /in/EEQFI on line 11
Process exited with code 255.