3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $ref = new ReflectionFunction('gmmktime'); $params = $ref->getParameters(); var_dump($params[0]->isOptional(), $params[0]->isDefaultValueAvailable());
Output for 5.2.0 - 7.1.10
bool(true) bool(false)
Output for 5.0.0 - 5.1.6
Notice: Undefined offset: 0 in /in/8sWpm on line 6 Fatal error: Call to a member function isOptional() on a non-object in /in/8sWpm on line 6
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: reflectionfunction in /in/8sWpm on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: reflectionfunction in /in/8sWpm on line 3