When I echo var_dump($_variable), I get one long, wrapping line with all varable\'s and values like
[\"kt_login_user\"]=> string(8) \"teacher1\" [\"kt_lo
For devs needing something that works in the view source and the CLI, especially useful when debugging unit tests.
echo vd([['foo'=>1, 'bar'=>2]]);
function vd($in) {
ob_start();
var_dump($in);
return "\n" . preg_replace("/=>[\r\n\s]+/", "=> ", ob_get_clean());
}
Yields:
array(1) {
[0] => array(2) {
'foo' => int(1)
'bar' => int(2)
}
}