PHPackages                             julien-boudry/php-reference - 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. julien-boudry/php-reference

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

julien-boudry/php-reference
===========================

A PHP documentation generator that analyzes namespaces using reflection and generates comprehensive Markdown documentation with cross-references

v0.7.1(4w ago)11832BSD-3-ClausePHPCI passing

Since Oct 29Pushed 4w ago1 watchersCompare

[ Source](https://github.com/julien-boudry/PhpReference)[ Packagist](https://packagist.org/packages/julien-boudry/php-reference)[ Fund](https://blockchair.com/bitcoin/address/bc1q3jllk3qd9fjvvuqy07tawkv7t6h7qjf55fc2gh)[ GitHub Sponsors](https://github.com/julien-boudry)[ RSS](/packages/julien-boudry-php-reference/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (1)Dependencies (24)Versions (12)Used By (2)

PhpReference
============

[](#phpreference)

> **Main Author:** [Julien Boudry](https://www.linkedin.com/in/julienboudry/)
> **License:** [BSD-3-Clause](LICENSE) - Please [say hello](https://github.com/julien-boudry/PhpReference/discussions) if you like or use this code!
> **Donation:** ₿ [bc1q3jllk3qd9fjvvuqy07tawkv7t6h7qjf55fc2gh](https://blockchair.com/bitcoin/address/bc1q3jllk3qd9fjvvuqy07tawkv7t6h7qjf55fc2gh) or [GitHub Sponsor Page](https://github.com/sponsors/julien-boudry)

[![License](https://camo.githubusercontent.com/76dd2ea5eb78d4b2c34ba968c18fd5bc39228963c493f050c19337a8d483711c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4253445f332d2d436c617573652d626c75652e737667)](https://opensource.org/licenses/BSD-3-Clause)[![Packagist](https://camo.githubusercontent.com/a2c7d65e4fb1736032d1fc3056dac103464fa6627766a49f98f47ed103ced8d0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a756c69656e2d626f756472792f7068702d7265666572656e63652e737667)](https://packagist.org/packages/julien-boudry/php-reference)

**PhpReference** is a powerful documentation generator for PHP projects. It analyzes your codebase using reflection and generates comprehensive Markdown documentation for your namespaces, classes, methods, properties, and constants.

Workflow
--------

[](#workflow)

- **Automatic Documentation Generation** - Analyzes PHP namespaces using reflection to extract classes, methods, properties, constants, and their metadata
- **PHPDoc Integration** - Parses and renders PHPDoc blocks including descriptions, parameters, return types, and custom tags
- **Cross-Referencing** - Generates internal links between classes, methods, and properties
- **Public API Focus** - Control what gets documented using `@api` tags or visibility rules
- **Markdown Output** - Clean, readable documentation in Markdown format ready for GitHub, GitLab, or your documentation site

Features
--------

[](#features)

- **Full Reflection Analysis** - Classes, interfaces, traits, enums, methods, properties, constants
- **PHPDoc Parsing** - Descriptions, `@param`, `@return`, `@throws`, `@see`, custom tags
- **Type Resolution** - Automatic linking to documented types
- **Cross-References** - Internal links between elements
- **Inheritance Tracking** - Shows declaring class for inherited members
- **Custom Public API Rules** - Define what gets documented
- **Source Links** - Optional links back to source code
- **Configuration File Support** - Set your preferences once in `reference.php` and run without arguments

Quick Start
-----------

[](#quick-start)

### Installation

[](#installation)

Install PhpReference via Composer:

```
composer require --dev julien-boudry/php-reference
```

### Recommended: Using a Configuration File

[](#recommended-using-a-configuration-file)

**The recommended way to use PhpReference is with a configuration file.** This avoids typing the same arguments repeatedly and makes your documentation setup reproducible.

Create a `reference.php` file at your project root:

```
