This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** Debug function */ | |
function db($data) { | |
$backtrace = debug_backtrace(); | |
$caller = array_shift($backtrace); | |
echo '<br><pre style="color:#B99AFF;">##### <span style="color:green;">'.$caller['file'].'</span> <span style="color:red;">Line: '.$caller['line']. '</span> #####<br><span style="color:blue;">'; | |
if( !empty($data) ) { print_r( $data ); } else { print_r("Empty variable.<br>"); } | |
echo '</span>######################################################</pre><br>'; | |
} |