Debug class

The Debug class is a simple utility for debugging variables, objects, arrays, etc by outputting information to the display.

package Fuel
category Core
link http://docs.fuelphp.com/classes/debug.html

 Methods

Output the call stack from here, or the supplied one.

backtrace(array $trace) : string

Parameters

$trace

array

(optional) A backtrace to output

Returns

stringFormatted backtrace

Benchmark anything that is callable

benchmark(callable $callable, array $params) : array

access public
static

Parameters

$callable

callable

$params

array

Returns

array

Prints a list of all currently declared classes.

classes() 

access public
static

Prints a list of all currently declared constants.

constants() 

access public
static

Quick and nice way to output a mixed variable to the browser

dump() : string

static
access public

Returns

string

Prints a list of all currently loaded PHP extensions.

extensions() 

access public
static

Returns the debug lines from the specified file

file_lines(string $filepath, int $line_num, bool $highlight, int $padding) : array

access protected

Parameters

$filepath

string

the file path

$line_num

int

the line number

$highlight

bool

whether to use syntax highlighting or not

$padding

int

the amount of line padding

Returns

array

Formats the given $var's output in a nice looking, Foldable interface.

format(string $name, mixed $var, int $level, string $indent_char, string $scope) : string

Parameters

$name

string

the name of the var

$var

mixed

the variable

$level

int

the indentation level

$indent_char

string

the indentation character

$scope

string

Returns

stringthe formatted string.

Prints a list of all currently declared functions.

functions() 

access public
static

Prints a list of all HTTP request headers.

headers() 

access public
static

Prints a list of all currently included (or required) files.

includes() 

access public
static

Quick and nice way to output a mixed variable to the browser

inspect() : string

static
access public

Returns

string

Prints a list of all currently declared interfaces (PHP5 only).

interfaces() 

access public
static

Prints a list of the configuration settings read from <i>php.ini</i>

phpini() 

access public
static

 Properties

 

$js_toggle_open

$js_toggle_open 

 

$max_nesting_level

$max_nesting_level 

 

$files

$files 

 

$js_displayed

$js_displayed