src/core/ToolBox.class.php
static public function debug_print($input=NULL, $printItForMe=NULL, $removeHR=NULL, $usePreTags=true) {
		if(!is_numeric($removeHR)) {
			$removeHR = ToolBox::$debugRemoveHr;
		}

		if(!is_numeric($printItForMe)) {
			$printItForMe = ToolBox::$debugPrintOpt;
		}
		
		ob_start();
		print_r($input);
		$output = ob_get_contents();
		ob_end_clean();
		
		if($usePreTags === true) {
			$output = "<pre class='cs debug'>$output</pre>";
		}
		
		if(!isset($_SERVER['SERVER_PROTOCOL']) || !$_SERVER['SERVER_PROTOCOL']) {
			$output = strip_tags($output);
			$hrString = "\n***************************************************************\n";
		}
		else {
			$hrString = "<hr>";
		}
		if($removeHR) {
			$hrString = NULL;;
		}
		
		if($printItForMe) {
			print "$output". $hrString ."\n";
		}
	
		return($output);
	}
static public function debug_print($input=NULL, $printItForMe=NULL, $removeHR=NULL, $usePreTags=true) {
		if(!is_numeric($removeHR)) {
			$removeHR = ToolBox::$debugRemoveHr;
		}

		if(!is_numeric($printItForMe)) {
			$printItForMe = ToolBox::$debugPrintOpt;
		}
		
		ob_start();
		print_r($input);
		$output = ob_get_contents();
		ob_end_clean();
		
		if($usePreTags === true) {
			$output = "<pre class='cs debug'>$output</pre>";
		}
		
		if(!isset($_SERVER['SERVER_PROTOCOL']) || !$_SERVER['SERVER_PROTOCOL']) {
			$output = strip_tags($output);
			$hrString = "\n***************************************************************\n";
		}
		else {
			$hrString = "<hr>";
		}
		if($removeHR) {
			$hrString = NULL;;
		}
		
		if($printItForMe) {
			print "$output". $hrString ."\n";
		}
	
		return($output);
	}
static public function debug_print ( $ input = NULL , $ printItForMe = NULL , $ removeHR = NULL , $ usePreTags = true ) { if ( ! is_numeric ( $ removeHR ) ) { $ removeHR = ToolBox :: $ debugRemoveHr ; } if ( ! is_numeric ( $ printItForMe ) ) { $ printItForMe = ToolBox :: $ debugPrintOpt ; } ob_start ( ) ; print_r ( $ input ) ; $ output = ob_get_contents ( ) ; ob_end_clean ( ) ; if ( $ usePreTags === true ) { $ output = "<pre class='cs debug'>$output</pre>" ; } if ( ! isset ( $ _SERVER [ 'SERVER_PROTOCOL' ] ) || ! $ _SERVER [ 'SERVER_PROTOCOL' ] ) { $ output = strip_tags ( $ output ) ; $ hrString = "\n***************************************************************\n" ; } else { $ hrString = "<hr>" ; } if ( $ removeHR ) { $ hrString = NULL ; ; } if ( $ printItForMe ) { print "$output" . $ hrString . "\n" ; } return ( $ output ) ; }
A way of printing out human-readable information, especially arrays & objects, either to a web browser or via
the command line.

@param $input		(mixed,optional) data to print/return
@param $printItForMe	(bool,optional) whether it should be printed or just returned.

@return (string)		printed data.
@codeCoverageIgnore
A way of printing out human - readable information especially arrays & objects either to a web browser or via the command line .