/ Published in: PHP
A little pile of functions I use for implementing a nice var dump alternative.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function dd($var) { echo '<pre>' . fl() . dump($var) . PHP_EOL . PHP_EOL . 'dd() exit</pre>'; } function d($var) { echo '<pre>' . fl() . dump($var) . '</pre>'; } function fl() { $dbbt = dbbt(); } function dbbt() { return $dbbt; } function dump($var) { $var = 'array(0) empty'; $var = 'boolean ' . ((true === $var) ? 'true' : 'false'); } elseif (null === $var) { $var = 'null'; } }