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

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

phpdocumentor/reflection-docblock
=================================

With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.

6.0.3(2mo ago)9.4k722.2M—3.8%136[10 issues](https://github.com/phpDocumentor/ReflectionDocBlock/issues)[8 PRs](https://github.com/phpDocumentor/ReflectionDocBlock/pulls)20MITPHPPHP ^7.4 || ^8.0CI passing

Since Apr 6Pushed 2mo ago16 watchersCompare

[ Source](https://github.com/phpDocumentor/ReflectionDocBlock)[ Packagist](https://packagist.org/packages/phpdocumentor/reflection-docblock)[ RSS](/packages/phpdocumentor-reflection-docblock/feed)WikiDiscussions 6.x Synced 1mo ago

READMEChangelog (10)Dependencies (26)Versions (88)Used By (20)

[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)[![Integrate](https://github.com/phpDocumentor/ReflectionDocBlock/actions/workflows/integrate.yaml/badge.svg)](https://github.com/phpDocumentor/ReflectionDocBlock/actions/workflows/integrate.yaml)[![Scrutinizer Code Coverage](https://camo.githubusercontent.com/aa60574d4567424ff377b64120671060977ff5c6db5240692e11e57a313912ca/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f706870446f63756d656e746f722f5265666c656374696f6e446f63426c6f636b2e737667)](https://scrutinizer-ci.com/g/phpDocumentor/ReflectionDocBlock/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/bb3095c16229c57cda1d65e7dbc24d1183e5f75ddb47b1a4daa3157a4f78b906/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f706870446f63756d656e746f722f5265666c656374696f6e446f63426c6f636b2e737667)](https://scrutinizer-ci.com/g/phpDocumentor/ReflectionDocBlock/?branch=master)[![Stable Version](https://camo.githubusercontent.com/0af8becdbd695314b69d1bd61969d42a20fd7d178cb651d05f14cf5fb6f73ea4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706870646f63756d656e746f722f7265666c656374696f6e2d646f63626c6f636b2e7376673f6c6162656c3d737461626c65)](https://packagist.org/packages/phpdocumentor/reflection-docblock)[![Unstable Version](https://camo.githubusercontent.com/badae4a677efc107813f74da34c904a2dc1f615860e745f60eab4f4a08fb5603/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706870646f63756d656e746f722f7265666c656374696f6e2d646f63626c6f636b2e7376673f696e636c7564655f70726572656c6561736573266c6162656c3d756e737461626c65)](https://packagist.org/packages/phpdocumentor/reflection-docblock)

ReflectionDocBlock
==================

[](#reflectiondocblock)

Introduction
------------

[](#introduction)

The ReflectionDocBlock component of phpDocumentor provides a DocBlock parser that is 100% compatible with the [PHPDoc standard](http://phpdoc.org/docs/latest).

With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.

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

[](#installation)

```
composer require phpdocumentor/reflection-docblock
```

Usage
-----

[](#usage)

In order to parse the DocBlock one needs a DocBlockFactory that can be instantiated using its `createInstance` factory method like this:

```
$factory  = \phpDocumentor\Reflection\DocBlockFactory::createInstance();
```

Then we can use the `create` method of the factory to interpret the DocBlock. Please note that it is also possible to provide a class that has the `getDocComment()` method, such as an object of type `ReflectionClass`, the create method will read that if it exists.

```
$docComment = getDescription();

// You can either cast it to string
$description = (string) $docblock->getDescription();

// Or use the render method to get a string representation of the Description.
$description = $docblock->getDescription()->render();
```

> For more examples it would be best to review the scripts in the [`/docs/examples` folder](/docs/examples).

###  Health Score

82

—

ExcellentBetter than 100% of packages

Maintenance88

Actively maintained with recent releases

Popularity87

Widely adopted with strong download metrics

Community59

Growing community involvement

Maturity84

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~68 days

Recently: every ~4 days

Total

76

Last Release

61d ago

Major Versions

4.3.2 → 5.0.0-alpha62019-12-20

4.3.3 → 5.0.0-alpha72019-12-27

4.3.4 → 5.0.0-alpha82020-01-12

5.6.6 → 6.0.02026-01-07

5.6.7 → 6.0.32026-03-18

PHP version history (9 changes)1.0.0-beta1PHP &gt;=5.3.2

2.0.0a2PHP &gt;=5.3.3

3.0.0PHP &gt;=5.5

4.0.0PHP ^7.0

3.3.2PHP ^5.6 || ^7.0

5.0.0-alpha1PHP &gt;=7.1

5.0.0-alpha6PHP ^7.2

5.2.0PHP ^7.2 || ^8.0

5.4.0PHP ^7.4 || ^8.0

### Community

Maintainers

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

![](https://www.gravatar.com/avatar/1323714f58f9144af310e5e4217e61b96ad7c42bc5c93a1f2d97deca95f6f4f8?d=identicon)[ashnazg](/maintainers/ashnazg)

![](https://www.gravatar.com/avatar/471baf346b526fa9e1259ee3d577b1dd72fbb45337b495d5475f87ba063490cb?d=identicon)[jaapio](/maintainers/jaapio)

---

Top Contributors

[![jaapio](https://avatars.githubusercontent.com/u/1060433?v=4)](https://github.com/jaapio "jaapio (290 commits)")[![mvriel](https://avatars.githubusercontent.com/u/193704?v=4)](https://github.com/mvriel "mvriel (124 commits)")[![boenrobot](https://avatars.githubusercontent.com/u/1029536?v=4)](https://github.com/boenrobot "boenrobot (77 commits)")[![ashnazg](https://avatars.githubusercontent.com/u/100170?v=4)](https://github.com/ashnazg "ashnazg (64 commits)")[![TomasVotruba](https://avatars.githubusercontent.com/u/924196?v=4)](https://github.com/TomasVotruba "TomasVotruba (48 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (38 commits)")[![jrfnl](https://avatars.githubusercontent.com/u/663378?v=4)](https://github.com/jrfnl "jrfnl (27 commits)")[![voku](https://avatars.githubusercontent.com/u/264695?v=4)](https://github.com/voku "voku (22 commits)")[![ahjdev](https://avatars.githubusercontent.com/u/107793906?v=4)](https://github.com/ahjdev "ahjdev (11 commits)")[![GautierDele](https://avatars.githubusercontent.com/u/12382966?v=4)](https://github.com/GautierDele "GautierDele (10 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (9 commits)")[![mspirkov](https://avatars.githubusercontent.com/u/63721828?v=4)](https://github.com/mspirkov "mspirkov (9 commits)")[![yunosh](https://avatars.githubusercontent.com/u/379318?v=4)](https://github.com/yunosh "yunosh (7 commits)")[![barryvdh](https://avatars.githubusercontent.com/u/973269?v=4)](https://github.com/barryvdh "barryvdh (7 commits)")[![carusogabriel](https://avatars.githubusercontent.com/u/16328050?v=4)](https://github.com/carusogabriel "carusogabriel (5 commits)")[![villfa](https://avatars.githubusercontent.com/u/2891564?v=4)](https://github.com/villfa "villfa (5 commits)")[![tmdk](https://avatars.githubusercontent.com/u/690621?v=4)](https://github.com/tmdk "tmdk (4 commits)")[![drupol](https://avatars.githubusercontent.com/u/252042?v=4)](https://github.com/drupol "drupol (4 commits)")[![orklah](https://avatars.githubusercontent.com/u/9605520?v=4)](https://github.com/orklah "orklah (4 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (4 commits)")

---

Tags

docblocks

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[icanhazstring/composer-unused

Show unused packages by scanning your code

1.7k7.0M188](/packages/icanhazstring-composer-unused)[spatie/laravel-settings

Store your application settings

1.5k5.9M72](/packages/spatie-laravel-settings)[phpdocumentor/reflection

Reflection library to do Static Analysis for PHP Projects

12521.4M109](/packages/phpdocumentor-reflection)[symplify/monorepo-builder

Not only Composer tools to build a Monorepo.

5205.3M82](/packages/symplify-monorepo-builder)[spatie/typescript-transformer

This is my package typescript-transformer

3706.5M16](/packages/spatie-typescript-transformer)[symfony/ai-platform

PHP library for interacting with AI platform provider.

51927.7k136](/packages/symfony-ai-platform)

PHPackages © 2026

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