sebastianbergmann/exporter — explained in plain English
Analysis updated 2026-06-24
Print any PHP variable including deeply nested arrays and objects in a consistent, readable format for debug output.
Display clearly formatted variable values in custom PHPUnit assertion failure messages so test failures are easier to understand.
Handle circular references in PHP objects or arrays safely when converting them to text, without crashing or looping forever.
| sebastianbergmann/exporter | denvercoder1/github-readme-streak-stats | hyperf/hyperf | |
|---|---|---|---|
| Stars | 6,823 | 6,822 | 6,833 |
| Language | PHP | PHP | PHP |
| Setup difficulty | easy | easy | hard |
| Complexity | 2/5 | 1/5 | 4/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
This is a small PHP library that converts any PHP variable into a readable text representation. Numbers, strings, booleans, arrays, objects, and special values like null or resources all get printed out in a consistent format that shows their type and contents clearly. It is mainly useful when you need to display the state of a variable for debugging or in a test failure message. The library handles situations that would normally be tricky to display, such as circular references where an array or object refers back to itself. Rather than looping forever or crashing, it marks the repeated reference so you can see the structure without confusion. It also has a shorter export mode that shows just the type and a brief indicator when the value is large, instead of printing everything out. Installation is through Composer, the standard PHP package manager. You can add it as a regular project dependency or as a development-only dependency if it is only needed for tests. The library does not have a complex setup, you create an Exporter instance and call export() on whatever value you want to inspect. This package is best known as an internal dependency of PHPUnit, the widely used PHP testing framework, where it formats values in assertion failure output. Most PHP developers encounter it indirectly rather than installing it directly. The README is focused entirely on code examples rather than prose, so the scope of the library is exactly what the examples show: variable visualization for development and testing contexts.
Small PHP library that converts any variable, arrays, objects, null, circular references, into a readable text representation. Best known as an internal dependency of PHPUnit that formats values in test failure messages.
Mainly PHP. The stack also includes PHP, Composer.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.