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

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

fivelab/reflection
==================

Tools for work with reflection

v1.0.1(10y ago)09.3k[1 issues](https://github.com/FiveLab/Reflection/issues)5MITPHPPHP &gt;=5.4

Since Aug 31Pushed 10y ago1 watchersCompare

[ Source](https://github.com/FiveLab/Reflection)[ Packagist](https://packagist.org/packages/fivelab/reflection)[ RSS](/packages/fivelab-reflection/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (3)Used By (5)

Reflection Helper
=================

[](#reflection-helper)

This package add helper methods for work with [PHP Reflection](http://php.net/manual/en/book.reflection.php)

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

[](#installation)

Add **FiveLab/Reflection** in your composer.json:

```
{
    "require": {
        "fivelab/reflection": "~1.0"
    }
}
```

Now tell composer to download the library by running the command:

```
$ php composer.phar update fivelab/reflection
```

Basic usage
-----------

[](#basic-usage)

The class `FiveLab\Component\Reflection\Reflection` is final, and can not use as object. All methods in this class statically.

Examples for work with this package:

```
use FiveLab\Component\Reflection\Reflection

// Get class reflection
$reflection = Reflection::loadClassReflection('MyClass');

// Get method reflection
$reflection = Reflection::loadMethodReflection('MyClass', 'myMethod');

// Get object reflection
$object = new MyClass();
$reflection = Reflection::loadObjectReflection($object);

// Get all properties from class
$properties = Reflection::getClassProperties('MyClass');

// Get all properties from class with gets from parents classes
$properties = Reflection::getClassProperties('MyClass', true);

// Get only private properties from class
$properties = Reflection::getClassProperties('MyClass', false, \ReflectionProperty::IS_PRIVATE);

// Set value to property in object
$object = new MyClass();
Reflection::setPropertyValue($object, 'myProperty', 'FooBar');

// Get value from property
$object = new MyClass();
$value = Reflection::getPropertyValue($object, 'myProperty');
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity59

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

Every ~29 days

Total

2

Last Release

3884d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/626ec10367b16fd0c7f8279eec25caa64084d5bd9a01789e0645279988e9a185?d=identicon)[ZhukV](/maintainers/ZhukV)

---

Top Contributors

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

---

Tags

reflectionannotation

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[phpdocumentor/reflection-common

Common reflection classes used by phpdocumentor to reflect the code structure

9.1k706.8M26](/packages/phpdocumentor-reflection-common)[symfony/property-access

Provides functions to read and write from/to an object or array using a simple string notation

2.8k295.3M2.5k](/packages/symfony-property-access)[phpdocumentor/reflection

Reflection library to do Static Analysis for PHP Projects

12521.4M109](/packages/phpdocumentor-reflection)[php-di/phpdoc-reader

PhpDocReader parses @var and @param values in PHP docblocks (supports namespaced class names with the same resolution rules as PHP)

7431.6M55](/packages/php-di-phpdoc-reader)[minime/annotations

The KISS PHP annotations library

229378.6k37](/packages/minime-annotations)[koriym/attributes

An annotation/attribute reader

433.4M12](/packages/koriym-attributes)

PHPackages © 2026

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