Documentation

Class Phalcon\Debug\Dump

Source on GitHub

Dumps information about a variable(s)

<?php

    $foo = 123;
    echo (new \Phalcon\Debug\Dump())->variable($foo, "foo");
<?php

    $foo = "string";
    $bar = ["key" => "value"];
    $baz = new stdClass();
    echo (new \Phalcon\Debug\Dump())->variables($foo, $bar, $baz);

Methods

public __construct ([unknown $styles], [unknown $detailed])

Phalcon\Debug\Dump constructor

public all ()

Alias of variables() method

public getStyle (unknown $type)

Get style for type

public setStyles ([unknown $styles])

Set styles for vars type

public output (unknown $variable, [unknown $name], [unknown $tab])

Prepare an HTML string of information about a single variable.

public variable (unknown $variable, [unknown $name])

Returns an HTML string of information about a single variable.

<?php

    echo (new \Phalcon\Debug\Dump())->variable($foo, "foo");

public variables ()

Returns an HTML string of debugging information about any number of variables, each wrapped in a “pre” tag.

<?php

    $foo = "string";
    $bar = ["key" => "value"];
    $baz = new stdClass();
    echo (new \Phalcon\Debug\Dump())->variables($foo, $bar, $baz);

public one (unknown $variable, [unknown $name])

...

public var (unknown $variable, [unknown $name])

...

public vars ()

...