PHP Debugging Tools
PHP print_r Formatter
Clean up PHP print_r output so arrays and nested values are easier to scan.
Formatted output
Array
(
[name] => Ada
[roles] => Array
(
[0] => admin
[1] => editor
)
)
Use this formatter when copied print_r() output is compressed onto one line and hard to read.
PHP example
echo '<pre>';
print_r($value);
echo '</pre>';
Common mistakes
print_r() is readable but loses type detail. Use var_dump() or structured logging when types matter.
FAQ
Does this parse every print_r output?
It formats common inline print_r output and is intended as a quick readability helper.
Should print_r be used in production?
No. Use structured logging and remove direct debug output from production responses.
Related tools
PHP Serialized Data Viewer
View PHP serialized data as an indented tree for debugging nested arrays and objects.
PHP JSON Formatter Online
Format and validate JSON used with PHP json_decode and json_encode directly in your browser.
PHP Regex Tester
Test regular expression patterns against sample text before using preg_match in PHP.