iamjohndev / var-print-prettifier
A PHP class for prettifying print_r and var_dump output
Installs: 10
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/iamjohndev/var-print-prettifier
Requires
- php: ^8.0
This package is auto-updated.
Last update: 2025-09-20 22:15:12 UTC
README
A PHP package that provides a simple and easy-to-use function to pretty print variables for debugging purposes.
Installation
This package can be easily installed using Composer. Run the following command to add it to your project's dependencies:
composer require iamjohndev/var-print-prettifier
Usage
use iamjohndev\VarPrintPrettifier; $data = [ 'name' => 'John Doe', 'age' => 30, 'email' => 'johndoe@example.com', 'address' => [ 'street' => '123 Main St', 'city' => 'Anytown', 'state' => 'CA', 'zip' => '12345' ] ]; VarPrintifier::var_dump($data); VarPrintifier::print_r($data);
The dump method pretty prints the given variable in a human-readable format. It can be used to debug complex data structures and objects.