@ 2015-09-18T07:34:44Z <?php
class Some
{
public function method(int $int)
{
}
}
$function = new ReflectionMethod('Some', 'method');
foreach ($function->getParameters() as $parameter) {
var_dump($parameter->isCallable(), $parameter->getType());
}
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 8.0.0 - 8.0.30 , 8.1.0 - 8.1.28 , 8.2.0 - 8.2.18 , 8.3.0 - 8.3.6 Deprecated: Method ReflectionParameter::isCallable() is deprecated in /in/XUtMu on line 19
bool(false)
object(ReflectionNamedType)#3 (0) {
}
Output for 7.1.0 - 7.1.33 , 7.2.0 - 7.2.33 , 7.3.0 - 7.3.33 , 7.4.0 - 7.4.33 bool(false)
object(ReflectionNamedType)#3 (0) {
}
Output for 7.0.0 - 7.0.20 bool(false)
object(ReflectionType)#3 (0) {
}
Output for 5.4.0 - 5.4.45 , 5.5.0 - 5.5.38 , 5.6.0 - 5.6.30 Fatal error: Call to undefined method ReflectionParameter::getType() in /in/XUtMu on line 19
Process exited with code 255 . preferences:dark mode live preview
256.73 ms | 402 KiB | 333 Q