PHPackages                             sajadsdi/php-reflection - 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. sajadsdi/php-reflection

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

sajadsdi/php-reflection
=======================

Tools for get class reflection

1.0.0(2y ago)1351MITPHPPHP ^8.1

Since Dec 7Pushed 2y ago1 watchersCompare

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

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

PHP Reflection
--------------

[](#php-reflection)

The PHP Reflection library provides a set of tools for performing class reflection in PHP. It allows you to retrieve information about classes, properties, methods, and constants using PHP's built-in reflection capabilities.

### Installation

[](#installation)

You can install the PHP Reflection library via Composer. Run the following command in your project directory:

```
composer require sajadsdi/php-reflection
```

### Usage

[](#usage)

To use the Reflections library, follow these steps:

1. Import the `Reflections` class into your PHP file:

```
use Sajadsdi\PhpReflection\Reflections;
```

2. Create an instance of the `Reflections` class (use singleton for better performance):

```
$reflections = new Reflections();
```

3.0. Perform class reflection:

```
$class = new MyClass();
$reflectionClass = $reflections->reflection($class);

//or
$reflectionClass = $reflections->reflection(MyClass::class);
```

3.1.Retrieve properties, methods, or constants:

```
$properties = $reflections->properties(MyClass::class);
$methods = $reflections->methods(MyClass::class);
$constants = $reflections->constants(MyClass::class);
```

### Contributing

[](#contributing)

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on the GitHub repository.

### License

[](#license)

This library is open-source and released under the MIT License. See the [LICENSE](LICENSE) file for more information.

### Credits

[](#credits)

The PHP Reflection library is developed and maintained by SajaD SaeeDi.

Feel free to use this library in your projects and enjoy the power of class reflection in PHP!

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 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

893d ago

### Community

Maintainers

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

---

Top Contributors

[![sajadsdi](https://avatars.githubusercontent.com/u/4072719?v=4)](https://github.com/sajadsdi "sajadsdi (11 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sajadsdi-php-reflection/health.svg)

```
[![Health](https://phpackages.com/badges/sajadsdi-php-reflection/health.svg)](https://phpackages.com/packages/sajadsdi-php-reflection)
```

###  Alternatives

[rikbruil/specification

A PHP implementation of the Specification-pattern

18284.8k1](/packages/rikbruil-specification)[lara-zeus/accordion

Zeus Accordion is filamentphp layout component to group components

11122.8k2](/packages/lara-zeus-accordion)[flownative/anchorlinks

Create links to headlines or sections in Neos

10130.8k1](/packages/flownative-anchorlinks)

PHPackages © 2026

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