3v4l.org

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