Skip to content

Commit b1a65a5

Browse files
committed
IHF: get_dump doc added.
1 parent d1f4545 commit b1a65a5

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,25 @@ Provides Laravel-specific and pure PHP helper functions.
3030
3131
#### `get_dump`
3232
33-
Lalala
33+
Returns nicely formatted string representation of the variable, using [Symfony VarDumper Component](http://symfony.com/doc/current/components/var_dumper/introduction.html) with all of it's benefits:
34+
```php
35+
$var = array(
36+
'a simple string' => 'in an array of 5 elements',
37+
'a float' => 1.0,
38+
'an integer' => 1,
39+
'a boolean' => true,
40+
'an empty array' => array(),
41+
);
42+
$dump = get_dump($var);
43+
44+
// array:5 [
45+
// "a simple string" => "in an array of 5 elements"
46+
// "a float" => 1.0
47+
// "an integer" => 1
48+
// "a boolean" => true
49+
// "an empty array" => []
50+
// ]
51+
```
3452

3553
## Json
3654

0 commit comments

Comments
 (0)