sanmai/callable-reflection

ReflectionFunctionAbstract for any callable

Maintainers

Package info

github.com/sanmai/callable-reflection

pkg:composer/sanmai/callable-reflection

Transparency log

Fund package maintenance!

sanmai

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

1.0.1 2026-07-19 01:15 UTC

README

Get ReflectionFunctionAbstract for any callable.

Installation

composer require sanmai/callable-reflection

Usage

use CallableReflection\CallableReflection;

$reflection = new CallableReflection();
$params = $reflection->reflect($callable)->getNumberOfParameters();

Works with closures, functions, methods, invokable objects, and first-class callables.

Unlike with ReflectionFunction(Closure::fromCallable($callable)), you can dependency-inject it.