Exemple #1
0
function dumpc($data, $depth, $return = false)
{
    global $configVarDumper;
    $d = new DebugVarDumper();
    foreach ($configVarDumper as $k => $v) {
        $d->{$k} = $v;
    }
    $d->highlight = false;
    if ($depth !== null) {
        $d->depth = $depth;
    }
    if (!enableDebug()) {
        return;
    }
    $ret = whereCalled(2) . "\n\n";
    $ret .= $d->dumpAsString($data);
    if ($return) {
        return $ret;
    }
    echo $ret;
}
 /**
  * method dump()
  * param $var
  * return dump variable content and location
  */
 private function dump($var)
 {
     $result = var_export($var, true);
     $loc = whereCalled();
     return "\n<pre>Dump: {$loc}\n{$result}</pre>";
 }
Exemple #3
0
function debug($message)
{
	echo 'DEBUG: '.$message.' @ '.whereCalled().PHP_EOL;
}