PHPackages                             ivastly/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. [API Development](/categories/api)
4. /
5. ivastly/php-reflection

ActiveLibrary[API Development](/categories/api)

ivastly/php-reflection
======================

PHP Reflection API simplified.

1.0.0(5y ago)313.6k↓46.3%MITPHPPHP 8.\*

Since Feb 14Pushed 5y ago1 watchersCompare

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

READMEChangelogDependencies (1)Versions (2)Used By (0)

PHP Reflection
==============

[](#php-reflection)

[![build status](https://github.com/ivastly/php-reflection/workflows/test-with-coverage/badge.svg)](https://github.com/ivastly/php-reflection/workflows/test-with-coverage/badge.svg)

Rationale
---------

[](#rationale)

Ever questioned yourself why you need to write more than a single line of code to get a value of private property? What if the property is private and defined in a parent class? Even more toil is required. Please welcome a library to solve this trouble once and for all.

Functionality
-------------

[](#functionality)

- Read value of any property of an object, including parent classes, with a single call.
- Find out the visibility of a property, including parent classes, with a single call.
- Check if a property exists in a class.

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

[](#installation)

```
composer require ivastly/php-reflection
```

Usage
-----

[](#usage)

```
class ParentClass {
    private $property = 'parent private property';
}

class C extends ParentClass {

}

$object = new C();
$reflection = new \Ivastly\PhpReflection\Reflection();

$value = $reflection->getProperty($object, 'property');
$visibility = $reflection->getVisibility($object, 'property');

echo "$visibility \$property = '$value;'\n"; // private $property = 'parent private property';
```

See [example.php](/doc/example.php)

Tests
-----

[](#tests)

```
make test
```

### Code coverage 🟩

[](#code-coverage-)

[![coverage is 100%](/doc/coverage.png)](/doc/coverage.png)

License
-------

[](#license)

See [LICENSE.md](/LICENSE.md)

Contributing
------------

[](#contributing)

See [CONTRIBUTING.md](/CONTRIBUTING.md)

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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

1919d ago

### Community

Maintainers

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

---

Top Contributors

[![ivastly](https://avatars.githubusercontent.com/u/919655?v=4)](https://github.com/ivastly "ivastly (8 commits)")

---

Tags

phpapireflection

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[jstolpe/instagram-graph-api-php-sdk

Instagram Graph API PHP SDK

13998.4k2](/packages/jstolpe-instagram-graph-api-php-sdk)

PHPackages © 2026

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