PHPackages                             appertly/hphpdoc - 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. [API Development](/categories/api)
4. /
5. appertly/hphpdoc

ActiveLibrary[API Development](/categories/api)

appertly/hphpdoc
================

An API documentation generator for Hack/HHVM and PHP

0.4.0(9y ago)3412[1 issues](https://github.com/appertly/hphpdoc/issues)Apache-2.0Hack

Since May 17Pushed 9y ago1 watchersCompare

[ Source](https://github.com/appertly/hphpdoc)[ Packagist](https://packagist.org/packages/appertly/hphpdoc)[ Docs](http://github.com/appertly/hphpdoc)[ RSS](/packages/appertly-hphpdoc/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (8)Versions (9)Used By (0)

hphpdoc
=======

[](#hphpdoc)

API Documentation Generator for Hack/HHVM and PHP

Check out some example documentation: actually, [it's our own API](https://appertly.github.io/hphpdoc/api/). Please have a look.

[![Packagist](https://camo.githubusercontent.com/71ae44c89da54615741375264d14d078158b76585d4391d9e64d6acfdcc38090/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6170706572746c792f68706870646f632e737667)](https://packagist.org/packages/appertly/hphpdoc)[![Build Status](https://camo.githubusercontent.com/a6305a0b8fb731cff881ecc4f059774ada131c21b36a156a98808077ed892aeb/68747470733a2f2f7472617669732d63692e6f72672f6170706572746c792f68706870646f632e737667)](https://travis-ci.org/appertly/hphpdoc)

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

[](#installation)

You can install this library using Composer:

```
$ composer require appertly/hphpdoc
```

- The master branch (version 0.x) of this project requires HHVM 3.12 and depends on `appertly/axe`, `appertly/cleopatra`, and `fredemmott/definition-finder`.

Compliance
----------

[](#compliance)

Releases of this library will conform to [Semantic Versioning](http://semver.org).

Our code is intended to comply with [PSR-1](http://www.php-fig.org/psr/psr-1/), [PSR-2](http://www.php-fig.org/psr/psr-2/), and [PSR-4](http://www.php-fig.org/psr/psr-4/). If you find any issues related to standards compliance, please send a pull request!

Usage
-----

[](#usage)

You can view a list of all command line options with the `-h` or `--help` flags, or by simply calling the `hphpdoc` executable with no arguments.

```
Usage:  hphpdoc [options] [--] [args...]

hphpdoc generates API documentation for Hack and PHP files.

Options:
  -h --help     Show this help screen
  --version     Displays version information
  -v --verbose  Increases verbosity level (can be used more than once, e.g.
                -vvv)
  -q --quiet    Prevents any output except errors; supercedes the verbose
                setting
  -x --exclude  Excludes specific files and folders from scanning (can be used
                more than once), wildcards are not supported
  -o --output   Specifies the directory for generated documentation; defaults
                to PWD

```

For example:

```
hphpdoc -v -x tests -o build/api .

```

PHPDoc Syntax
-------------

[](#phpdoc-syntax)

For the most part, we're trying to cover everything in [PSR-5](https://github.com/phpDocumentor/fig-standards/blob/master/proposed/phpdoc.md). This initial release covers many tags, but not all of them just yet.

Being that Hack has more strict typehints than PHP 5, you can omit types from your `@var`, `@param`, and `@return` PHPDoc tags if you choose!

```
/**
 * @var You can omit the type here, or…
 */
protected string $something = "nothing";
/**
 * …you can just specify a description here. The type is detected automatically!
 */
protected Vector $test = Vector{'foo'};
/**
 * This is my method.
 *
 * This is a description.
 *
 * @param $name - The name
 * @param $numbers - The numbers
 * @param $log - The log
 * @return - The thing you need. Always specify a dash before description.
 * @throws \RuntimeException if anything goes wrong
 */
public function getFoo(string $name, ConstVector $numbers, Psr\Log\LoggerInterface $log): ?Foo
{
    return null;
}
```

If your return type or parameter typehint is `mixed`, hphpdoc will fall back to the PHPDoc tag type, if one is specified. Example:

```
/**
 * @return array|string|null The return type
 */
function nope(): mixed
{
    return null;
}
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96.2% 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 ~19 days

Recently: every ~12 days

Total

8

Last Release

3505d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/659262eac941ffe4795493834425fc9a2369c2c9df3cc565ed4194f1d37be934?d=identicon)[doublecompile](/maintainers/doublecompile)

---

Top Contributors

[![doublecompile](https://avatars.githubusercontent.com/u/4267230?v=4)](https://github.com/doublecompile "doublecompile (25 commits)")[![acrylic-origami](https://avatars.githubusercontent.com/u/13635288?v=4)](https://github.com/acrylic-origami "acrylic-origami (1 commits)")

---

Tags

phpapidocumentationhhvmhack

### Embed Badge

![Health badge](/badges/appertly-hphpdoc/health.svg)

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

###  Alternatives

[algolia/algoliasearch-client-php

API powering the features of Algolia.

69333.0M114](/packages/algolia-algoliasearch-client-php)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[crada/php-apidoc

Generate documentation for php API based application. No dependency. No framework required.

259206.9k2](/packages/crada-php-apidoc)[comgate/sdk

Comgate PHP SDK

13327.8k](/packages/comgate-sdk)[rubix/server

Deploy your Rubix ML models to production with scalable stand-alone inference servers.

632.3k](/packages/rubix-server)

PHPackages © 2026

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