yii\helpers\BaseVarDumper::dump PHP Method

dump() public static method

This method achieves the similar functionality as var_dump and print_r but is more robust when handling complex objects such as Yii controllers.
public static dump ( mixed $var, integer $depth = 10, boolean $highlight = false )
$var mixed variable to be dumped
$depth integer maximum depth that the dumper should go into the variable. Defaults to 10.
$highlight boolean whether the result should be syntax-highlighted
    public static function dump($var, $depth = 10, $highlight = false)
    {
        echo static::dumpAsString($var, $depth, $highlight);
    }

Usage Example

Beispiel #1
0
function vd($var, $exit = true)
{
    \yii\helpers\BaseVarDumper::dump($var, 10, true);
    if ($exit) {
        exit;
    }
}
All Usage Examples Of yii\helpers\BaseVarDumper::dump