PHPackages                             coroq/callable-reflector - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. coroq/callable-reflector

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

coroq/callable-reflector
========================

v1.0.0(3y ago)01172MITPHPPHP &gt;=7.2

Since Apr 15Pushed 3y agoCompare

[ Source](https://github.com/coroq-com/callable-reflector)[ Packagist](https://packagist.org/packages/coroq/callable-reflector)[ RSS](/packages/coroq-callable-reflector/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (2)

Callable Reflector
==================

[](#callable-reflector)

Easily create reflections of callables in PHP.

Requirements
------------

[](#requirements)

- PHP &gt;= 7.2

Installation
------------

[](#installation)

```
composer require coroq/callable-reflector
```

Usage
-----

[](#usage)

```
use Coroq\CallableReflector\CallableReflector;

$reflection = CallableReflector::createFromCallable($callable);
```

`$callable` can be a closure, a function, a static method, an instance method, or an invokable object.

The returned reflection object is an instance of ReflectionFunctionAbstract, which can be either ReflectionFunction or ReflectionMethod depending on the callable type.

Here's an example for each type of callable:

```
// Function
$reflection = CallableReflector:createFromCallable('strlen');

// Closure
$closure = function($x) { return $x * 2; };
$reflection = CallableReflector::createFromCallable($closure);

// Static method
$reflection = CallableReflector::createFromCallable('ExampleClass::staticMethod');
$reflection = CallableReflector::createFromCallable([ExampleClass::class, 'staticMethod']);

// Instance method
$object = new ExampleClass();
$reflection = CallableReflector::createFromCallable([$object, 'instanceMethod']);

// Invokable object
$object = new InvokableClass(); // InvokableClass has __invoke()
$reflection = CallableReflector::createFromCallable($object);
```

License
-------

[](#license)

This project is licensed under the MIT License.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1120d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/addac0ea12d91786ce888c91ef7de6525bc17252c702cd7e48fe64ab547c012e?d=identicon)[ozami](/maintainers/ozami)

---

Top Contributors

[![ozami](https://avatars.githubusercontent.com/u/170309?v=4)](https://github.com/ozami "ozami (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/coroq-callable-reflector/health.svg)

```
[![Health](https://phpackages.com/badges/coroq-callable-reflector/health.svg)](https://phpackages.com/packages/coroq-callable-reflector)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
