class Dumper

internal  
 

Dumps PHP variables.

Properties

static $maxLength
static $maxDepth
static $dumpDir
static $maxPathSegments
static $pathSeparator

Methods

static string
toLine(mixed $var)

Converts a variable to a compact single-line string representation.

static string
toPhp(mixed $var)

Converts a variable to a pretty-printed PHP representation.

static string
dumpException(Throwable $e)

Formats an exception with its message, trace, and diff command into a human-readable string.

static string
saveOutput(string $testFile, mixed $content, string $suffix = '')

Saves assertion dump to the output directory (configured by $dumpDir).

static string
color(string $color = '', string|null $s = null) deprecated

No description

static string
removeColors(string $s) deprecated

No description

Details

at line 30
static string toLine(mixed $var)

Converts a variable to a compact single-line string representation.

Parameters

mixed $var

Return Value

string

at line 102
static string toPhp(mixed $var)

Converts a variable to a pretty-printed PHP representation.

Parameters

mixed $var

Return Value

string

at line 292
static string dumpException(Throwable $e)

Formats an exception with its message, trace, and diff command into a human-readable string.

Parameters

Throwable $e

Return Value

string

at line 395
static string saveOutput(string $testFile, mixed $content, string $suffix = '')

Saves assertion dump to the output directory (configured by $dumpDir).

Parameters

string $testFile
mixed $content
string $suffix

Return Value

string

at line 409
static string color(string $color = '', string|null $s = null) deprecated

deprecated use Ansi::color() or Ansi::colorize()

No description

Parameters

string $color
string|null $s

Return Value

string

at line 418
static string removeColors(string $s) deprecated

deprecated use Ansi::stripAnsi()

No description

Parameters

string $s

Return Value

string