Skip to content

Latest commit

 

History

History
48 lines (31 loc) · 1014 Bytes

File metadata and controls

48 lines (31 loc) · 1014 Bytes

Global Functions

The following global functions are available with the Debug package. Learn more information about these functions in the dumping variables chapter.

If error reporting is off, these functions will not output anything.

debug(... $args): void

Output the value of a variable, or multiple variables.

debug($foo, $bar);

dump(... $args): void

Output the value of a variable, or multiple variables, and include type information.

dump($foo, $bar);

backtrace(?Exception $e): void

Output the back trace of the script, or the stack trace of an exception.

backtrace();
backtrace($e);

inspect(Exception $e): void

Output the stack trace, file path, line number, and metadata of an exception.

inspect($e);

export(mixed $var): void

Output the variable into a PHP/Hack usable format.

export($baz);