PHPackages                             bartlett/php-reflect - 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. bartlett/php-reflect

Abandoned → [https://github.com/Roave/BetterReflection](/?search=https%3A%2F%2Fgithub.com%2FRoave%2FBetterReflection)ArchivedLibrary[Utility &amp; Helpers](/categories/utility)

bartlett/php-reflect
====================

Adds the ability to reverse-engineer classes, interfaces, functions, constants, namespaces, traits and more.

4.4.1(5y ago)6093.8k11BSD-3-ClausePHPPHP ^7.1.3|^8.0

Since Oct 12Pushed 5y ago5 watchersCompare

[ Source](https://github.com/llaville/php-reflect)[ Packagist](https://packagist.org/packages/bartlett/php-reflect)[ Docs](http://php5.laurent-laville.org/reflect/)[ RSS](/packages/bartlett-php-reflect/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (14)Versions (37)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/44d1288001ae5f1dd3f065c407faf155b20c02d3dea7dde87f56cd89801c8bda/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f626172746c6574742f7068702d7265666c656374)](https://packagist.org/packages/bartlett/php-reflect)[![Minimum PHP Version)](https://camo.githubusercontent.com/5ca8005dc65bce15d602fac5985e4f4dbb6c1caacfc0befb4451e5d97cad7acb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f626172746c6574742f7068702d7265666c656374)](https://php.net/)[![EOL](https://camo.githubusercontent.com/90fac750cfc79a17006454852316180b3f53d6587ddfec980bf7b30a31e3535b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f70726f6a6563742d656e642d2d6f662d2d6c6966652d696d706f7274616e74)](https://camo.githubusercontent.com/90fac750cfc79a17006454852316180b3f53d6587ddfec980bf7b30a31e3535b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f70726f6a6563742d656e642d2d6f662d2d6c6966652d696d706f7274616e74)

PHP Reflect
===========

[](#php-reflect)

**PHP Reflect** is a library that adds the ability to reverse-engineer classes, interfaces, functions, constants, namespaces, traits and more.

Running on PHP greater than 7.1 for parsing source code in a format PHP 5.2 to PHP 7.4

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

[](#requirements)

- PHP 7.1.3 or greater
- PHPUnit 7 or greater (if you want to run unit tests)

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

[](#installation)

The recommended way to install this library is [through composer](http://getcomposer.org). If you don't know yet what is composer, have a look [on introduction](http://getcomposer.org/doc/00-intro.md).

```
composer require bartlett/php-reflect
```

Build PHAR distribution
-----------------------

[](#build-phar-distribution)

To build PHAR distribution, you'll need to get a copy of this project

**WARNING**: Don't forget to run following command (before compiling archive), if you want to have a PHAR manifest up-to-date !

```
php phar-manifest.php > manifest.txt
```

Run following command

```
box.phar compile
```

You should get output that look like

```
Box version 3.8.4@120b0a3 2019-12-13 17:22:43 UTC

 // Loading the configuration file "/shared/backups/bartlett/php-reflect/box.json.dist".

🔨  Building the PHAR "/shared/backups/bartlett/php-reflect/bin/phpreflect.phar"

? No compactor to register
? Adding main file: /shared/backups/bartlett/php-reflect/bin/phpreflect
? Adding requirements checker
? Adding binary files
    > No file found
? Auto-discover files? No
? Exclude dev files? No
? Adding files
    > 890 file(s)
? Using stub file: /shared/backups/bartlett/php-reflect/phar-stub.php
? Skipping dumping the Composer autoloader
? Removing the Composer dump artefacts
? Compressing with the algorithm "GZ"
    > Warning: the extension "zlib" will now be required to execute the PHAR
? Setting file permissions to 0755
* Done.

No recommendation found.
No warning found.

 // PHAR: 916 files (987.43KB)
 // You can inspect the generated PHAR with the "info" command.

 // Memory usage: 20.52MB (peak: 21.40MB), time: 1sec

```

Documentation
-------------

[](#documentation)

The documentation for PHP Reflect 4.2 is available in [English](http://php5.laurent-laville.org/reflect/manual/4.2/en/)to read it online or download to read it later (multiple formats).

AsciiDoc source code are available on `docs` folder of the repository.

Contributors
------------

[](#contributors)

- Laurent Laville (Lead Dev)
- Thanks to Nikita Popov who wrote a marvellous [PHP Parser](https://github.com/nikic/PHP-Parser) and simplify the job of PHP Reflect.
- Thanks also to Remi Collet, a contributor of first hours.

[![](https://camo.githubusercontent.com/8f17ad0fdf8f69d214abb4bec55345605fc2359a328a014c9091f076cc2ca4ae/68747470733a2f2f736f757263657265722e696f2f66616d652f6c6c6176696c6c652f6c6c6176696c6c652f7068702d7265666c6563742f696d616765732f30)](https://sourcerer.io/fame/llaville/llaville/php-reflect/links/0)[![](https://camo.githubusercontent.com/0d61dd023a68497ae40ae354969f93368b0bfd1577a36996debc884c98077383/68747470733a2f2f736f757263657265722e696f2f66616d652f6c6c6176696c6c652f6c6c6176696c6c652f7068702d7265666c6563742f696d616765732f31)](https://sourcerer.io/fame/llaville/llaville/php-reflect/links/1)[![](https://camo.githubusercontent.com/b368d469d9acb557b4acb63274c60e843ac125681a9d60b78e83304ae090dd51/68747470733a2f2f736f757263657265722e696f2f66616d652f6c6c6176696c6c652f6c6c6176696c6c652f7068702d7265666c6563742f696d616765732f32)](https://sourcerer.io/fame/llaville/llaville/php-reflect/links/2)[![](https://camo.githubusercontent.com/68a32a739facd6fc81918c3c724585c1295d8a7153c5b8c52f3bbd4b398814dc/68747470733a2f2f736f757263657265722e696f2f66616d652f6c6c6176696c6c652f6c6c6176696c6c652f7068702d7265666c6563742f696d616765732f33)](https://sourcerer.io/fame/llaville/llaville/php-reflect/links/3)[![](https://camo.githubusercontent.com/e0805cd40cb1e73afd29c93e6817249e268282e6f086d69c92747d79d7b586f8/68747470733a2f2f736f757263657265722e696f2f66616d652f6c6c6176696c6c652f6c6c6176696c6c652f7068702d7265666c6563742f696d616765732f34)](https://sourcerer.io/fame/llaville/llaville/php-reflect/links/4)[![](https://camo.githubusercontent.com/a1487b900346223b8d09932d411acbc368722b50fd3f79ce586991e85d008f35/68747470733a2f2f736f757263657265722e696f2f66616d652f6c6c6176696c6c652f6c6c6176696c6c652f7068702d7265666c6563742f696d616765732f35)](https://sourcerer.io/fame/llaville/llaville/php-reflect/links/5)[![](https://camo.githubusercontent.com/a01264e0943f7e94ae78a590e60eb4794dafb85d036f92b06affe5c350e02c68/68747470733a2f2f736f757263657265722e696f2f66616d652f6c6c6176696c6c652f6c6c6176696c6c652f7068702d7265666c6563742f696d616765732f36)](https://sourcerer.io/fame/llaville/llaville/php-reflect/links/6)[![](https://camo.githubusercontent.com/a56a62ec452bfc75495b3fc9cdfb0ad56b80858312edd61c38f6544b9e644862/68747470733a2f2f736f757263657265722e696f2f66616d652f6c6c6176696c6c652f6c6c6176696c6c652f7068702d7265666c6563742f696d616765732f37)](https://sourcerer.io/fame/llaville/llaville/php-reflect/links/7)

License
-------

[](#license)

This project is licensed under the BSD-3-Clause License - see the [LICENSE](https://github.com/llaville/php-reflect/blob/master/LICENSE) file for details

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity42

Moderate usage in the ecosystem

Community17

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 98.9% 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 ~73 days

Recently: every ~172 days

Total

36

Last Release

2050d ago

Major Versions

1.9.0 → 2.0.0RC32014-03-24

2.6.2 → 3.0.0-alpha22015-01-05

2.6.3 → 3.0.12015-04-16

3.1.2 → 4.0.02015-12-04

PHP version history (7 changes)1.9.0PHP &gt;=5.3.0

3.0.0-beta1PHP &gt;=5.3.2

4.0.0PHP &gt;=5.4.0

4.2.1PHP &gt;=5.5

4.3.0-RC1PHP ^5.5|^7.0

4.4.0PHP ^7.1.3

4.4.1PHP ^7.1.3|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/555d494363fdc69e712d56b46d3b9bf3fe221f2dae8a0cf3c732b0138d54f192?d=identicon)[llaville](/maintainers/llaville)

---

Top Contributors

[![llaville](https://avatars.githubusercontent.com/u/364342?v=4)](https://github.com/llaville "llaville (1035 commits)")[![ecolinet-orange](https://avatars.githubusercontent.com/u/172283361?v=4)](https://github.com/ecolinet-orange "ecolinet-orange (6 commits)")[![remicollet](https://avatars.githubusercontent.com/u/270445?v=4)](https://github.com/remicollet "remicollet (5 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (1 commits)")

---

Tags

phpreflectionreflectionreverse-engineer

### Embed Badge

![Health badge](/badges/bartlett-php-reflect/health.svg)

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

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[symfony/maker-bundle

Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.

3.4k111.1M568](/packages/symfony-maker-bundle)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[humbug/box

Fast, zero config application bundler with PHARs.

1.3k801.5k69](/packages/humbug-box)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)

PHPackages © 2026

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