0) { $calledFrom = debug_backtrace(); if (is_string($key)) { if (!isset(DebugTab::$groups[$key])) { DebugTab::$groups[$key] = array(); } DebugTab::$groups[$key][] = array( 'debug' => print_r($var, true), 'file' => substr(str_replace(ROOT, '', $calledFrom[0]['file']), 1), 'line' => $calledFrom[0]['line'], 'display' => $display ); } else { DebugTab::$content[] = array( 'debug' => print_r($var, true), 'file' => substr(str_replace(ROOT, '', $calledFrom[0]['file']), 1), 'line' => $calledFrom[0]['line'], 'display' => $display ); } } return true; } /** * Display debugged information * * @return string HTML */ public static function get() { return '
' .
			print_r(DebugTab::$groups, true) .
			print_r(DebugTab::$content, true) .
			'
'; } } /** * Public, quick access function for class * * @return boolean Success */ function debugTab($var = false, $display = false, $key = null) { return DebugTab::debug($var, $display, $key); }