PHP 8.3+ · any framework or plain PHP

A prettier
phpinfo()

Parse, query, and display your PHP configuration with a clean API and a modern, searchable interface. Drop-in replacement for the default phpinfo() page.

composer require stechstudio/phpinfo
Pretty PHP Info dark mode interface Pretty PHP Info light mode interface

Two ways to use it

A beautiful browser UI and a powerful programmatic API. Same package.

Browser

Drop-in phpinfo() replacement

One line of code gives you a searchable, responsive, dark-mode-ready interface. Sidebar navigation, keyboard shortcuts, click-to-copy values. Zero external requests — everything is self-contained.

// Replace your phpinfo() call
prettyphpinfo();
// Or exclude env vars for security
prettyphpinfo(INFO_MODULES);
Programmatic

Query anything in your PHP config

Structured data model with a fluent, iterable API. Look up modules, configs, directives — with local and master values. Parse saved phpinfo output from any source.

$info = Info::capture();
$info->version(); // "8.5.4"
$info->hasModule('curl'); // true
$info->config('memory_limit'); // "128M"

Clean, expressive API

Everything you need to inspect PHP configuration, nothing you don't.

Check modules and configs
$info = Info::capture();
// Check for extensions
$info->hasModule('redis'); // true
// Get any config value
$info->config('max_file_uploads'); // "20"
$info->config('max_file_uploads', 'master'); // "100"
// Dig into a specific module
$info->module('curl')->config('version'); // "8.7.1"
// Convenience methods
$info->os(); // "Linux"
$info->hostname(); // "web-01"
Iterate and explore
// Iterate all modules
$info->modules()->each(function($module) {
  $module->name();
  $module->configs()->count();
});
// Flatten all configs across modules
$info->configs()->count(); // 342
$info->configs()->filter(fn($c) => ...);
// Parse saved output from any source
Info::fromHtml($saved);
Info::fromText($cliOutput);
Info::detect($anything);
Instant search

Filter across all modules and configs as you type. Press / to focus.

Dark mode

Follows system preference with a manual toggle. Persists your choice across sessions.

Click to copy

Hover any config value to reveal a copy button. Works on HTTP and HTTPS.

Deep linking

Every module, group, and config has a unique URL hash. Link directly to any directive.

Self-contained

All CSS and JS are inlined. No CDN requests, no external dependencies. Works air-gapped.

Dual parser

Parses both HTML (web) and plaintext (CLI) phpinfo() output. Auto-detects the format.

Why a package?

Can't I just use ini_get()?

PHP configuration is scattered across a handful of narrow functions. ini_get() returns one value at a time. extension_loaded() gives you a boolean. phpversion() and php_uname() each return a single string.

Every one of these requires you to know exactly what you're looking for. There's no way to discover, iterate, or search.

And even combined, they can't give you everything. Compile options, Zend extension internals, stream wrappers, registered filters, and per-extension metadata are only available through phpinfo().

phpinfo() is the only function with the complete picture. This package makes that data actually usable.

Without this package
ini_get('memory_limit'); // local value only
extension_loaded('redis'); // just true/false
get_loaded_extensions(); // names, no config
phpversion(); // just the version
php_uname(); // just the OS
// compile flags? stream wrappers?
// master vs local values?
// iterate all config? ...nope.
With Pretty PHP Info
$info = Info::capture();
$info->config('memory_limit'); // local
$info->config('memory_limit', 'master'); // master
$info->hasModule('redis'); // check
$info->module('redis')->configs(); // full detail
// iterate everything, discover anything
$info->modules()->each(fn($m) => ...);
$info->configs()->filter(fn($c) => ...);

Get started in seconds

Install with Composer, call one function. That's it.

// 1. Install
$ composer require stechstudio/phpinfo
// 2. Use
require 'vendor/autoload.php';
prettyphpinfo();

Just want to try it?

No install required. This downloads a small PHP script, runs it locally, and opens a pretty phpinfo page right in your browser. Nothing leaves your machine.

curl -sSL prettyphpinfo.com/go | php

On Windows, use curl.exe instead of curl in PowerShell