dump()
Simple object and variable dumper to help with debugging.
dump(mixed $variable, bool $echo = true): string
Parameters
Name | Type | Default | Description |
---|---|---|---|
$variable |
mixed |
– | |
$echo |
bool |
true |
Return type
string
Example
dump($kirby->users());
$tags = $page->tags()->pluck(',');
dump($tags);
If you want to return only the value, you can set the second parameter to false:
$fruitSalad = ['🍎', '🥝', '🍒', '🍇', '🍐'];
$dump = dump($fruitSalad, false);