PHPackages                             mrcnpdlk/blox - 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. mrcnpdlk/blox

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

mrcnpdlk/blox
=============

A parser for block comment documentation.

3.0.2(8y ago)0236MITPHPPHP &gt;=5.3

Since Aug 4Pushed 8y agoCompare

[ Source](https://github.com/mrcnpdlk/blox)[ Packagist](https://packagist.org/packages/mrcnpdlk/blox)[ Docs](https://github.com/eloquent/blox)[ RSS](/packages/mrcnpdlk-blox/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (1)Versions (10)Used By (0)

Blox
====

[](#blox)

*A parser for block comment documentation.*

[![The most recent stable version is 3.0.1](https://camo.githubusercontent.com/657e0429839f3b88a361a403bc0f17fc5b5594cbb3c1c5a619f787a347c6cd20/687474703a2f2f696d672e736869656c64732e696f2f3a73656d7665722d332e302e312d627269676874677265656e2e737667 "This project uses semantic versioning")](http://semver.org/)[![Current build status image](https://camo.githubusercontent.com/f809e8c89a6962f675db0688a9a1497797e0577932fb3f679699480af6175d14/687474703a2f2f696d672e736869656c64732e696f2f7472617669732f656c6f7175656e742f626c6f782f646576656c6f702e737667 "Current build status for the develop branch")](https://travis-ci.org/eloquent/blox)[![Current coverage status image](https://camo.githubusercontent.com/0b001539c2cd91a2b73f6962c352b066d632ea424f7115dbc25cc82f78096fd5/687474703a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f656c6f7175656e742f626c6f782f646576656c6f702e737667 "Current test coverage for the develop branch")](https://coveralls.io/r/eloquent/blox)

Installation and documentation
------------------------------

[](#installation-and-documentation)

- Available as [Composer](http://getcomposer.org/) package [eloquent/blox](https://packagist.org/packages/eloquent/blox).
- [API documentation](http://lqnt.co/blox/artifacts/documentation/api/) available.

What is *Blox*?
---------------

[](#what-is-blox)

*Blox* is a parser for PHP block comment documentation. *Blox* allows a standard documentation block comment to be parsed into an object tree representation, with a simple interface for retrieving information.

Usage
-----

[](#usage)

```
use Eloquent\Blox\BloxParser;

$blockComment = body();    // outputs "This is the body.\n\nThis is also the body."

// outputs 'This is some tag content.', then 'This is some more tag content.'
foreach ($block->tagsByName('tagA') as $tag) {
    echo $tag->content();
}

$splatTags = $block->tagsByName('tagB');
echo array_pop($splatTags)->content(); // outputs 'This is content for a different tag which spans multiple lines.'
```

Conventions
-----------

[](#conventions)

*Blox* has a small set of conventions for block comments. They aim to be quite loose, so that *Blox* can be used, regardless of the body text format in use.

### Summary text

[](#summary-text)

The summary text starts from the first non-blank line and continues until a blank line, or the end of the block is encountered. White space at the beginning of lines, and newlines, are collapsed into a single space.

```
/**
 * This is the summary.
 *     This is also the summary.
 *
 * This is not the summary.
 */
```

### Body text

[](#body-text)

The body text starts from the first non-blank line after the summary, and continues until a tag, or the end of the block is encountered. White space and newlines are left as-is.

```
/**
 * This is not the body.
 *
 * This is the body.
 *
 * This is also the body.
 *
 * @tagA This is not the body.
 */
```

### Tags

[](#tags)

A tag is any line starting with the 'at' symbol (`@`) followed by one or more 'word' characters (as defined in [PCRE](http://php.net/pcre)). These 'word' characters make up the tag's 'name'.

Tags can optionally be followed by content which will be associated with the tag. White space directly after the tag name is ignored, but subsequent text is included in the tag content, as are subsequent lines until a blank line or another tag is encountered. White space at the beginning of lines, and newlines, are collapsed into a single space.

```
/**
 * This is not a tag.
 *
 * @tagA This is some tag content.
 * @tagA This is some more tag content.
 * @tagB This is content for a different tag
 *     which spans multiple lines.
 *
 * This is ignored.
 */
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 81.5% 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 ~277 days

Recently: every ~485 days

Total

8

Last Release

3086d ago

Major Versions

1.2.0 → 2.0.02013-03-04

2.0.0 → 3.0.02013-08-01

PHP version history (2 changes)1.0.0PHP &gt;=5.3.0

3.0.0PHP &gt;=5.3

### Community

Maintainers

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

---

Top Contributors

[![ezzatron](https://avatars.githubusercontent.com/u/100152?v=4)](https://github.com/ezzatron "ezzatron (22 commits)")[![mrcnpdlk](https://avatars.githubusercontent.com/u/22945316?v=4)](https://github.com/mrcnpdlk "mrcnpdlk (5 commits)")

---

Tags

phpdocparserdocumentationphpDocumentordocblocktagcommentblockannotation

### Embed Badge

![Health badge](/badges/mrcnpdlk-blox/health.svg)

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

###  Alternatives

[doctrine/lexer

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

11.2k910.8M118](/packages/doctrine-lexer)[jan-swiecki/simple-annotations

Simple annotation parser

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

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

2524.0M4](/packages/phpowermove-docblock)[cvuorinen/phpdoc-markdown-public

phpDocumentor template that generates Markdown documentation of the public API

3613.8k14](/packages/cvuorinen-phpdoc-markdown-public)[nelson6e65/phpdoc-vuepress

Template for generating your PHP API documentation in a pretty VuePress format.

224.5k2](/packages/nelson6e65-phpdoc-vuepress)[dudo1985/wpdocgen

Documentation Generator for WordPress.

2327.6k](/packages/dudo1985-wpdocgen)

PHPackages © 2026

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