tebe / phpinfo
Extends the phpinfo function and provides a structured output format using JSON.
v0.1.0
2026-01-01 12:35 UTC
Requires
- php: >=5.4
- ext-json: *
README
Wraps the phpinfo function and provides a more structured output format using HTML, TEXT, and JSON.
Supports all PHP versions from 5.4 onwards.
Smoke tested with all PHP versions on latest Ubuntu.
Installation
composer require tebe/phpinfo
Usage
Web with HTML output
<?php require dirname(__DIR__) . '/vendor/autoload.php'; tebe\phpinfo();
CLI with different text outputs
Text output
./vendor/bin/phpinfo ./vendor/bin/phpinfo --text
JSON output
./vendor/bin/phpinfo --json
Credits to https://www.reddit.com/user/HolyGonzo/.