PHPackages                             crazyfactory/docblocks - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. crazyfactory/docblocks

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

crazyfactory/docblocks
======================

A library for parsing and working with php docblocks from within your code.

2.2.0(8y ago)08191MITPHPPHP &gt;=7.1.0CI failing

Since May 31Pushed 8y ago2 watchersCompare

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

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

php-docblocks
=============

[](#php-docblocks)

Parses php doc blocks and makes them easily accessible.

This is based on using reflection and results should be heavily cached or only be used in processes which aren't time critical.

Install
-------

[](#install)

Run `composer require crazyfactory/docblocks` to install the latest version into your composer powered project.

Usage
-----

[](#usage)

You can pass in any doc-block formatted string into the constructor of *DocBlock* to have it parsed.

```
$dc = new DocBlock('/** myDocBlockString */');
```

Or you can pass in any Reflection object offering *getDocComment()* like *ReflectionMethod*, *ReflectionClass* etc.

```
$dc = new DocBlock(new \ReflectionClass(MyClass::class));
```

If you only care for the results in form of simple DocBlockParameter-array you can use the parser directly.

```
$results = DocBlock::parse($myDocBlockString);
```

Changelog
---------

[](#changelog)

- 2.0.0 added auto-deploy via travis CI with githubtags as version-nr.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity62

Established project with proven stability

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

Total

6

Last Release

3196d ago

Major Versions

1.9.0 → 2.0.02017-06-08

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2908547?v=4)[Jitendra Adhikari](/maintainers/adhocore)[@adhocore](https://github.com/adhocore)

---

Top Contributors

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

---

Tags

reflectiondocblockdocs

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/crazyfactory-docblocks/health.svg)

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

###  Alternatives

[doctrine/lexer

PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.

11.2k910.8M118](/packages/doctrine-lexer)[daux/daux.io

Documentation generator that uses a simple folder structure and Markdown files to create custom documentation on the fly

825191.0k1](/packages/daux-dauxio)[phpowermove/docblock

PHP Docblock parser and generator. An API to read and write Docblocks.

2524.0M4](/packages/phpowermove-docblock)[jan-swiecki/simple-annotations

Simple annotation parser

66615.0k18](/packages/jan-swiecki-simple-annotations)[dannykopping/docblock

A simple library for parsing PHP DocBlock comments

191.8k2](/packages/dannykopping-docblock)[tobiju/bookdown-bootswatch-templates

Bookdown.io With Bootswatch Styles And Prism Syntax Highlighting

1619.6k1](/packages/tobiju-bookdown-bootswatch-templates)

PHPackages © 2026

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