public static function dump($data = null, $export = false) {

		if(false === is_bool($export)) {
 			return trigger_error(sprintf('Argument 2 passed to %s() must be of the type boolean, "%s" given', __METHOD__, gettype($export)), E_USER_ERROR);
		}

		if($data === null || (true === is_string($data) && trim($data) === '') || true === is_bool($data)) {

			if($export) {
				return var_export($data);
			}

			echo '<pre>' . var_dump($data) . '</pre>';

			return;
		}
		
		if($export) {
			return print_r($data, true);
		}

		echo '<pre>' . print_r($data, true) . '</pre>';
	}
public static function dump($data = null, $export = false) {

		if(false === is_bool($export)) {
 			return trigger_error(sprintf('Argument 2 passed to %s() must be of the type boolean, "%s" given', __METHOD__, gettype($export)), E_USER_ERROR);
		}

		if($data === null || (true === is_string($data) && trim($data) === '') || true === is_bool($data)) {

			if($export) {
				return var_export($data);
			}

			echo '<pre>' . var_dump($data) . '</pre>';

			return;
		}
		
		if($export) {
			return print_r($data, true);
		}

		echo '<pre>' . print_r($data, true) . '</pre>';
	}
public static function dump ( $ data = null , $ export = false ) { if ( false === is_bool ( $ export ) ) { return trigger_error ( sprintf ( 'Argument 2 passed to %s() must be of the type boolean, "%s" given' , __METHOD__ , gettype ( $ export ) ) , E_USER_ERROR ) ; } if ( $ data === null || ( true === is_string ( $ data ) && trim ( $ data ) === '' ) || true === is_bool ( $ data ) ) { if ( $ export ) { return var_export ( $ data ) ; } echo '<pre>' . var_dump ( $ data ) . '</pre>' ; return ; } if ( $ export ) { return print_r ( $ data , true ) ; } echo '<pre>' . print_r ( $ data , true ) . '</pre>' ; }
Advanced debugging of variables
@param mixed $data
@param boolean $export
@return mixed
Advanced debugging of variables