PHP Class PHPDaemon\Core\Debug

Author: Vasily Zorin ([email protected])
Inheritance: use trait PHPDaemon\Traits\ClassWatchdog, use trait PHPDaemon\Traits\StaticObjectWatchdog
Show file Open project: kakserpom/phpdaemon Class Usage Examples

Public Methods

Method Description
backtrace ( $bool = false ) : string Returns textual backtrace
dump ( $args ) : string Wrapper of var_dump
exportBytes ( string $str, boolean $all = false ) : string Export binary data
json ( mixed $m ) : string Returns JSON
prettyJson ( mixed $m ) : string Returns pretty-printed JSON
proxy ( callable $cb, mixed $name = null ) : callable Returns a proxy callback function with logging for debugging purposes
refcount ( &$var ) : integer Get refcount of the given variable
zdump ( $args ) : string Wrapper of debug_zval_dump

Method Details

backtrace() public static method

Returns textual backtrace
public static backtrace ( $bool = false ) : string
return string

dump() public static method

Wrapper of var_dump
public static dump ( $args ) : string
return string Result of var_dump()

exportBytes() public static method

Export binary data
public static exportBytes ( string $str, boolean $all = false ) : string
$str string String
$all boolean Whether to replace all of chars with escaped sequences
return string Escaped string

json() public static method

Returns JSON
public static json ( mixed $m ) : string
$m mixed Data
return string

prettyJson() public static method

Returns pretty-printed JSON
public static prettyJson ( mixed $m ) : string
$m mixed Data
return string

proxy() public static method

Returns a proxy callback function with logging for debugging purposes
public static proxy ( callable $cb, mixed $name = null ) : callable
$cb callable Callback
$name mixed Data
return callable

refcount() public static method

Get refcount of the given variable
public static refcount ( &$var ) : integer
return integer

zdump() public static method

Wrapper of debug_zval_dump
public static zdump ( $args ) : string
return string Result of debug_zval_dump()