- var_dump: documentation ( source)
<?php
function create_reflection($function){ if (is_array($function)) { return new \ReflectionMethod($function[0], $function[1]); } if (is_object($function) && !$function instanceof \Closure) { return new \ReflectionMethod($function, '__invoke'); } return new \ReflectionFunction($function);}
$r = create_reflection('Exception::getMessage');
var_dump(get_class($r));