3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function someFunction(int $param, $param2) {} $reflectionFunc = new ReflectionFunction('someFunction'); $reflectionParams = $reflectionFunc->getParameters(); $reflectionType1 = $reflectionParams[0]->getType(); var_dump((string) $reflectionType1, $reflectionType1->isBuiltin());
based on Jj2qO
Output for 7.0.0 - 7.2.6
string(3) "int" bool(true)
Output for 5.3.21 - 5.6.28
Fatal error: Call to undefined method ReflectionParameter::getType() in /in/Jo4R5 on line 7
Process exited with code 255.