Pretty Global Info: A Beautiful PHP Debugger for Your Entire Machine

Categories: Development

If you’ve been a PHP developer for any length of time, you know the struggle of phpinfo(). It’s functional, but it’s certainly not pretty. It’s a giant, un-searchable wall of text and tables that looks like it hasn’t been updated since 1998.

Built on a Great Foundation

I’ve been a huge fan of the Pretty PHP Info package created by Joseph Szobody and the team at Stech Studio. Their library provides a beautiful way to parse, query, and display your PHP configuration with a clean API, you should definitely check out their original package.

The “Global” Twist

While the original package is perfect as a project dependency, I wanted to take it a step further. I wanted it available everywhere—in every project, and in every local site—without having to composer require it into every single composer.json.

Today, I’m excited to announce Pretty Global Info, a standalone, “boxed” distribution of Stech Studio’s library that lives in your PHP global configuration.

The Solution: Scoping & Isolation

Normally, adding a tool globally via php.ini is a recipe for dependency conflicts. To solve this, I took a page out of the Spatie Global Ray playbook.

Pretty Global Info bundles the Stech Studio library into a single PHAR (PHP Archive) where every internal class has been “scoped” (prefixed with GlobalPrettyPhpinfo). This means the tool runs in its own isolated bubble, ensuring it never breaks your local project, no matter how many dependencies you have.

The helper functions are wrapped with function_exists to prevent any declaration issues, this does however means prettyphpinfo is also globally loaded.

Key Features

  • Modern UI: All the searchable, responsive goodness of the Stech Studio original.
  • Zero Conflicts: Fully isolated namespaces for global use.
  • Safe Bootstrapping: A “Safe Loader” pattern ensures it fails silently if the binary is missing or incompatible.
  • Quick Aliases: Use ppi(), or prettyglobal().

Get Started in 60 Seconds

Installation is as simple as downloading the binary and updating your php.ini:

  1. Download the latest pretty.phar from our GitHub Releases.
  2. Add to php.ini:
    ini auto_prepend_file = "/path/to/pretty.phar"
  3. Profit: Open any PHP file and type pgi();.

Because prettyphpinfo() is also loaded globally, if you ever run into issues, use auto_append_file.

Credits

A huge thank you to Joseph Szobody and Stech Studio for their incredible work on the phpinfo package. This global distribution wouldn’t be possible without their clean API and beautiful design.

Check out the global distribution on GitHub, and start making your debug life a little more beautiful.

Give it a try!


Adam Patterson

Adam Patterson

User Interface Designer & Developer with a background in UX. I have spent 5 years as a professionally certified bicycle mechanic and ride year-round.

I am a husband and father of two, I enjoy photography, music, movies, coffee, and good food.

You can find me on Twitter, Instagram, and YouTube!