VarDumper
API reference › yii › helpers › VarDumper
VarDumper is intended to replace the buggy PHP function var_dump and print_r.
It can correctly identify the recursively referenced objects in a complex object structure. It also has a recursive depth control to avoid indefinite recursive display of some peculiar variables.
VarDumper can be used as follows,
VarDumper::dump($var);Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
dump() static | Displays a variable. | BaseVarDumper |
dumpAsString() static | Dumps a variable in terms of a string. | BaseVarDumper |
export() static | Exports a variable as a string representation. | BaseVarDumper |