3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $r = new ReflectionFunction('gmmktime'); $params = $r->getParameters(); var_dump($params[2]->isOptional(), $params[2]->isDefaultValueAvailable(), $params[2]->getDefaultValue());
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught ReflectionException: Cannot determine default value for internal functions in /in/WQltr:5 Stack trace: #0 /in/WQltr(5): ReflectionParameter->getDefaultValue() #1 {main} thrown in /in/WQltr on line 5
Process exited with code 255.
Output for hhvm-3.10.0 - 3.12.0
bool(true) bool(true) int(9223372036854775807)
Output for 5.2.0 - 5.6.28
Fatal error: Uncaught exception 'ReflectionException' with message 'Cannot determine default value for internal functions' in /in/WQltr:5 Stack trace: #0 /in/WQltr(5): ReflectionParameter->getDefaultValue() #1 {main} thrown in /in/WQltr on line 5
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Notice: Undefined offset: 2 in /in/WQltr on line 5 Fatal error: Call to a member function isOptional() on a non-object in /in/WQltr on line 5
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: reflectionfunction in /in/WQltr on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: reflectionfunction in /in/WQltr on line 2