PHPackages                             podlove/comment-introspection - 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. podlove/comment-introspection

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

podlove/comment-introspection
=============================

PHP library providing a toolkit to parse class and method comments.

04.7k↓100%PHP

Since Jan 4Pushed 12y ago2 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Podlove Comment Introspection
=============================

[](#podlove-comment-introspection)

[![Build Status](https://camo.githubusercontent.com/807f270b8e3fdb8f1eb5f7b9e56301cf75cfd2e138131dcf195fdab30b7fc27a/68747470733a2f2f7472617669732d63692e6f72672f706f646c6f76652f706f646c6f76652d636f6d6d656e742d696e74726f7370656374696f6e2e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/podlove/podlove-comment-introspection)

PHP library providing a toolkit to parse class and method comments.

Usage
-----

[](#usage)

```
use Podlove\Comment\Comment;

class ExampleClass {

    /**
     * A Title
     *
     * A multiline
     * description.
     *
     * @tag1
     * @tag2 tag2 description
     */
    public function foo() {
        return "bar";
    }
}

$reflectionClass = new ReflectionClass("ExampleClass");
$methods = $reflectionClass->getMethods();
$parsedMethods = array_map(function($method) {
    $c = new Comment($method->getDocComment());
    $c->parse();

    return [
        'methodname'  => $method->name,
        'title'       => $c->getTitle(),
        'description' => $c->getDescription(),
        'tags'        => $c->getTags()
        /**
         * You can also access specific tags like so:
         * $c->getTag('tag1') or
         * $c->getTags('param') if you use one tag multiple times
         */
    ];
}, $methods);
print_r($parsedMethods);

/* =>

Array
(
    [0] => Array
        (
            [methodname] => foo
            [title] => A Title
            [description] => A multiline
description.

            [tags] => Array
                (
                    [0] => Array
                        (
                            [name] => tag2
                            [description] => tag2 description
                            [line] => 6
                        )

                    [1] => Array
                        (
                            [name] => tag1
                            [description] =>
                            [line] => 5
                        )

                )

        )

)
*/
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/podlove-comment-introspection/health.svg)

```
[![Health](https://phpackages.com/badges/podlove-comment-introspection/health.svg)](https://phpackages.com/packages/podlove-comment-introspection)
```

###  Alternatives

[mtdowling/jmespath.php

Declaratively specify how to extract elements from a JSON document

2.0k472.8M135](/packages/mtdowling-jmespathphp)[opis/closure

A library that can be used to serialize closures (anonymous functions) and arbitrary data.

2.6k230.0M284](/packages/opis-closure)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M65](/packages/sabberworm-php-css-parser)[michelf/php-markdown

PHP Markdown

3.5k52.4M344](/packages/michelf-php-markdown)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)

PHPackages © 2026

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