Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/johansatge/printr
A lightweight, simple var_dump replacement.
https://github.com/johansatge/printr
debug php var-dump
Last synced: 5 days ago
JSON representation
A lightweight, simple var_dump replacement.
- Host: GitHub
- URL: https://github.com/johansatge/printr
- Owner: johansatge
- License: mit
- Created: 2015-09-11T20:54:17.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-07T11:51:23.000Z (about 9 years ago)
- Last Synced: 2024-10-30T11:11:59.446Z (about 2 months ago)
- Topics: debug, php, var-dump
- Language: PHP
- Homepage:
- Size: 156 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
A lightweight, simple `var_dump` replacement.
```php
$var = array('sample', 10, false, null);
printr($var);
```![Logo](logo.png)
---
* [Installation](#installation)
* [Usage](#usage)
* [Changelog](#changelog)
* [License](#license)## Installation
* Install & load the `printr.php` file
* May be used as a WordPress [mu-plugin](https://codex.wordpress.org/Must_Use_Plugins) (`/path-to-wp/wp-content/mu-plugins`)## Usage
```php
printr($var, $echo, $context);
```| Parameter | Default | Description |
| --- | --- | --- |
| `$var` | *None* | The variable to inspect |
| `$echo` | `true` | Outputs the result (the HTML is also returned as a `string`)
| `$context` | `true` | Outputs the file and line where the function has been called, if available |## Changelog
| Version | Date | Notes |
| --- | --- | --- |
| `1.0.0` | September 11, 2015 | Initial version |## License
This project is released under the [MIT License](license).