<?php /** * あらゆるcallableを対象にReflectionFunctionまたはReflectionMethodを生成します。 * * @param callable $callable * @return \ReflectionFunctionAbstract */ function reflect_callable(callable $callable) { if (is_string($callable) && strpos($callable, '::')) { $callable = explode('::', $callable); } elseif (!$callable instanceof \Closure && is_object($callable)) { $callable = [$callable, '__invoke']; } return $