4ASuite / Developer tools

phpDG · PHP DOCUMENTATION GENERATOR

Your PHP code.
Clearly documented.

Turn your classes, methods and DocBlocks into browsable documentation. One PHP file is all you need.

Open source · MIT license · No Composer required

phpDG / documentation
YOUR CODE
/**
 * Find a user by their ID.
 * @param int $id
 * @return User|null
 */
public function find(int $id): ?User
YOUR DOCUMENTATION

UserRepository Class


find(int $id): ?User

Find a user by their ID.

ParametersReturn valuesSource
1PHP file
0dependencies
10languages
MITfree & open source

GET STARTED

A small file. A useful addition.

Start with the defaults or prepare a generator for your project.

01 / DOWNLOAD

Ready to go

Download the bundled generator with default settings. Upload it to your PHP server and set your source folders.

Download generator ↓
03 / CONTRIBUTE

Explore the source

Read the code, follow development or contribute an improvement to the project on GitHub.

View on GitHub ↗

BUILT FOR EVERYDAY DEVELOPMENT

Less setup. More understanding.

One file, zero dependencies

Upload the generator without a package manager or a build pipeline.

Readable project structure

Explore classes, methods and functions in a hierarchical navigation tree.

Search as you type

Find the part of your codebase you need in generated documentation.

DocBlocks included

Keep descriptions, parameters and return values alongside your code.

Your language, your choice

Choose from ten documentation languages, including Slovak and Czech.

Optional access control

Configure HTTP users when preparing documentation for your team.

DOCUMENTATION

From source to documentation in three steps.

01

Upload the generator

Place generator.php on your PHP server where it can read your project files.

02

Choose your directories

Use the configurator or edit the settings array near the top of the downloaded file.

03

Generate & browse

Open the generator in your browser, generate the documentation, then browse output/index.html.

Configuration example
$settings = [
    'directories' => ['./src', './app'],
    'output_dir' => 'output',
    'exclude_dirs' => ['vendor', 'cache'],
    'http_auth' => [],
    'language' => 'en',
    'available_languages' => ['en', 'sk', 'cs'],
];

LIVE DEMO

See what your documentation can look like.

Try the generator

Open the hosted phpDG demo to explore the generation interface.

Launch generator ↗

Browse generated documentation

Explore a real example with project navigation, classes and methods.

View documentation ↗

FREE & OPEN SOURCE

Yours to use. Yours to build on.

phpDG is released under the MIT license, for personal and commercial projects.

Source & license ↗
Get phpDG ↓