I have a simple $_GET[]
query var set for showing testing data when pulling down queries from the DB.
<
Use
echo nl2br(var_dump());
This should work ^^
You could use this one debugVar()
instead of var_dump()
Check out: https://github.com/E1NSER/php-debug-function
There is a Symfony package for this: https://symfony.com/doc/current/components/var_dumper.html.
If it's "all smushed together" you can often give the ol' "view source code" a try. Sometimes the dumps, messages and exceptions seem like they're just one long string when it turns out that the line breaks simply don't show. Especially XML trees.
Alternatively, I've once created a small little tool called InteractiveVarDump for this very purpose. It certainly has its limits but it can also be very convenient sometimes. Even though it was designed with PHP 5 in mind.
Use preformatted HTML element
echo '<pre>';
var_dump($data);
echo '</pre>';
Try xdebug extension for php.
Example:
<?php var_dump($_SERVER); ?>
Outputs: