Wrapper of debug_zval_dump
@return string Result of debug_zval_dump()
427990
public static function zdump(...$args)
    {
        ob_start();

        foreach ($args as $v) {
            debug_zval_dump($v);
        }

        $dump = ob_get_contents();
        ob_end_clean();

        return $dump;
    }
1342540
protected function _debugReplaceBindValue($m) {
        $v = $this->_debugBindValues[':' . $m[1]];

        switch (gettype($v)) {
            case 'boolean' :
                return $v;
                break;

            case 'integer' :
                return $v;
                break;

            case 'double' :
                return $v;
                break;

            case 'string' :
                return "'" . addslashes($v) . "'";
                break;

            case 'NULL' :
                return 'NULL';
                break;

            default :
                return 'NULL';
                break;
        }
    }
1053145
public static function vars()
    {
        if (func_num_args() === 0)
        {
            return null;
        }

        $variables = func_get_args();
        $output = [];
        foreach ($variables as $var)
        {
            $output[] = VarDumper::dump($var);
        }

        return implode("\n", $output);
    }
88135
public function get_debug_string() {
		return 'status: '.$this->statuscode.' body:'.htmlentities($this->body).' errors: '.print_r($this->errors, true);
	}
76006
public function get_output() : string {
		$output = ( false !== $this->args['cache'] ) ? $this->get_cache() : '';

		if ( $output ) {
			return $output;
		}

		ob_start();
		if ( $this->has_template() ) {
			$this->load_template( $this->locate_template() );
		}
		$output = ob_get_clean();

		if ( false !== $this->args['cache'] ) {
			$this->set_cache( $output );
		}

		return $output;

	}
222414
public function dump()
    {
        $dump = [];
        if ($this->hasParameters()) {
            foreach ($this->parameters as $parameter) {
                $dump[$parameter->getName()] = $parameter->dump();
            }
        }
        return $dump;
    }
267438
public function dumpParameters()
    {
        $parameters = [];
        foreach ($this->getParameters() as $parameter) {
            $string = '';
            if ($parameter->isArray()) {
                $string .= 'array ';
            } elseif ($parameter->getClass()) {
                $string .= $parameter->getClass()->name.' ';
            }
            if ($parameter->isPassedByReference()) {
                $string .= '&';
            }
            $string .= '$'.$parameter->name;
            if ($parameter->isOptional()) {
                $string .= ' = '.var_export($parameter->getDefaultValue(), true);
            }
            $parameters[] = $string;
        }

        return '('.implode(', ', $parameters).')';
    }
975364
public function dump()
	{
		$pdo = $this->pdo();

		$sql = '';

		foreach ($this->list_tables() as $table)
		{
			$query = $pdo->query("SELECT * FROM `{$table}`");

			while ($row = $query->fetch(\PDO::FETCH_NUM)) 
			{
				$values = array();

				foreach ($row as $column) 
				{
					$values[] = is_null($column) ? 'NULL' : $pdo->quote($column);
				}

				$sql .= "INSERT INTO `{$table}` VALUES (".join(',', $values). ");\n";
			}
		}

		return $sql;
	}
133032
private function _debug() {

        $result = '';

        // iterate through the defined constants
        foreach(get_defined_constants() as $name => $number)

            // iterate through the set options
            foreach ($this->options as $index => $value)

                // if this is a curl-related constant and it is one of the options that are set, add it to the result
                if (substr($name, 0, 7) == 'CURLOPT' && $number == $index) $result .= str_pad($index, 5, ' ', STR_PAD_LEFT) . ' ' . $name . ' => ' . var_export($value, true) . '<br>';

        // return the result
        return $result;

    }
438417
public function dumpAsHtml()
	{
		$arguments = func_get_args();
		$total = count($arguments);

		$backtrace = debug_backtrace();

		// locate the first file entry that isn't this class itself
		foreach ($backtrace as $stack => $trace)
		{
			if (isset($trace['file']))
			{
				// If being called from within, or using call_user_func(), get the next entry
				if (strpos($trace['function'], 'call_user_func') === 0 or (isset($trace['class']) and $trace['class'] == get_class($this)))
				{
					continue;
				}

				$callee = $trace;
				$label = $this->inflector->humanize($backtrace[$stack+1]['function']);

				// get info about what was dumped
				$callee['code'] = '';
				for ($i = $callee['line']; $i > 0; $i--)
				{
					$line = $this->fileLines($callee['file'], $i, false, 0);
					$callee['code'] = reset($line).' '.trim($callee['code']);
					$tokens = token_get_all('<?php '.trim($callee['code']));
					if (is_array($tokens[1]) and isset($tokens[1][0]) and $tokens[1][0] != 377)
					{
						break;
					}
				}

				$results = array();
				$r = false;
				$c = 0;

				foreach($tokens as $token)
				{
					// skip everything before our function call
					if ($r === false)
					{
						if (isset($token[1]) and $token[1] == $callee['function'])
						{
							$r = 0;
						}
						continue;
					}

					// and quit if we find an end-of-statement
					if ($token == ';')
					{
						break;
					}

					// check for a start-of-expresssion
					elseif ($token == '(')
					{
						$c++;
						if ($c === 1)
						{
							continue;
						}
					}

					// check for an end-of-expresssion
					elseif ($token == ')')
					{
						$c--;
						if ($c === 0)
						{
							$r++;
							continue;
						}
					}

					// new expression in the same dump
					elseif ($token == ',' and $c === 1)
					{
						$r++;
						continue;
					}

					// make sure we have an array entry to add to, and add the token
					if ( ! isset($results[$r]))
					{
						$results[$r] = '';
					}
					$results[$r] .= is_array($token) ? $token[1] : $token;
				}

				// make sure we've parsed the same number of expressions as we have arguments
				if (count($results) == $total)
				{
					$callee['code'] = $results;
				}
				else
				{
					// parsing failed, try it the old fashioned way
					if (preg_match('/(.*'.$callee['function'].'\()(.*?)\);(.*)/', $callee['code'], $matches))
					{
						$callee['code'] = 'Variable'.($total==1?'':'s').' dumped: '.$matches[2];
					}
				}

				$callee['file'] = cleanpath($callee['file']);

				break;
			}
		}

		if ( ! $this->jsDisplayed)
		{
			echo <<<JS
<script type="text/javascript">function fuel_debug_toggle(a){if(document.getElementById){if(document.getElementById(a).style.display=="none"){document.getElementById(a).style.display="block"}else{document.getElementById(a).style.display="none"}}else{if(document.layers){if(document.id.display=="none"){document.id.display="block"}else{document.id.display="none"}}else{if(document.all.id.style.display=="none"){document.all.id.style.display="block"}else{document.all.id.style.display="none"}}}};</script>
JS;
			$this->jsDisplayed = true;
		}

		echo '<div class="fuelphp-dump" style="font-size: 13px;background: #EEE !important; border:1px solid #666; color: #000 !important; padding:10px;">';
		echo '<h1 style="padding: 0 0 5px 0; margin: 0; font: bold 110% sans-serif;">File: '.$callee['file'].' @ line: '.$callee['line'].'</h1>';
		if (is_string($callee['code']))
		{
			echo '<h5 style="border-bottom: 1px solid #CCC;padding: 0 0 5px 0; margin: 0 0 5px 0; font: bold 85% sans-serif;">'.$callee['code'].'</h5>'.PHP_EOL;
		}
		echo '<pre style="overflow:auto;font-size:100%;">';

		$i = 0;
		foreach ($arguments as $argument)
		{
			if (is_string($callee['code']))
			{
				echo '<strong>Variable #'.(++$i).' of '.$total.':</strong>'.PHP_EOL;
			}
			elseif (substr(trim($callee['code'][$i]),0,1) == '$')
			{
				echo '<strong>Variable: '.trim($callee['code'][$i++]).'</strong>'.PHP_EOL;
			}
			else
			{
				echo '<strong>Expression: '.trim($callee['code'][$i++]).'</strong>'.PHP_EOL;
			}
			echo $this->format('', $argument);
			if ($i < $total)
			{
				echo PHP_EOL;
			}
		}

		echo "</pre>";
		echo "</div>";
	}
739312
public function debugDumpParams()
    {
        $str  = "SQL: [".strlen($this->_statement)."] ".$this->_statement."\n";
        $str .= "Params: ".sizeof($this->_binds)."\n";
        foreach ($this->_binds as $key => $value) {
            $str .= "Key: Name: [".strlen($key)."] $key\n";
            $str .= "name=[".strlen($key)."] \"$key\"\n";
            $str .= "is_param=1\n";
        }
        echo substr($str, 0, strlen($str)-1);
    }
205400
protected static function debugbar(){
		if ( !self::$debugbar ) {
			$di = Di::getDefault();
			if ( $di->has( 'debugbar' ) ) {
				return self::$debugbar=$di->getShared('debugbar');
			}else{
                return self::$debugbar= new \Snowair\Debugbar\EmptyDebugbar();
			}
		}
		return self::$debugbar;
	}
750227
public function renderDebug()
    {
        $html = '';
        foreach (static::DEBUG_ELEMENTS as $element) {
            $html .= $this->consoleLog('"Checking element binding of ' . $element . '..."');
            $html .= $this->consoleLog($element . '!==undefined');
        }

        return $html;
    }
316487
private function getTraceOutput()
    {
        if (! $this->addTraceToOutput()) {
            return '';
        }
        $inspector = $this->getInspector();
        $frames = $inspector->getFrames();

        $response = "\nStack trace:";

        $line = 1;
        foreach ($frames as $frame) {
            /** @var Frame $frame */
            $class = $frame->getClass();

            $template = "\n%3d. %s->%s() %s:%d%s";
            if (! $class) {
                // Remove method arrow (->) from output.
                $template = "\n%3d. %s%s() %s:%d%s";
            }

            $response .= sprintf(
                $template,
                $line,
                $class,
                $frame->getFunction(),
                $frame->getFile(),
                $frame->getLine(),
                $this->getFrameArgsOutput($frame, $line)
            );

            $line++;
        }

        return $response;
    }
1094161
protected function dump() {
    $str = '';
    foreach (array_values($this->loadedObjects) as $curObject) {
      $str .= $curObject->dump();
    }
    return $str;
  }
1256504
function dump(){
		asort( $this->names, SORT_STRING );
		$t = max( 2, strlen( (string) $this->i ) );
		foreach( $this->names as $i => $n ){
			$i = str_pad( $i, $t, ' ', STR_PAD_LEFT );
			echo "$i => $n \n";
		}
	}
812028
public function ___debugInfo()
    {
        return array(
            'name'  => isset($this->propertyNode) ? $this->propertyNode->name->toString() : 'unknown',
            'class' => $this->className
        );
    }