File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -85,3 +85,28 @@ that can help you visualize and find the information.
85
85
86
86
When in doubt how to use a console command, open the help section by
87
87
appending the ``--help `` option.
88
+
89
+ Using the VarDumper
90
+ -------------------
91
+
92
+ To ease the debugging of a variable in your application, you can use the
93
+ ``VarDumper `` component to dump the content of a variable. The component
94
+ provides an alternative to the PHP ``var_dump `` function, in the form of
95
+ ``dump ``.
96
+
97
+ It is as easy as the code below::
98
+
99
+ // Create a variable with a value...
100
+ $myVar = ...;
101
+
102
+ // ... and dump it
103
+ dump($myVar);
104
+
105
+ .. tip ::
106
+
107
+ The dumper is not limited to scalar values. Arrays and objects can also be
108
+ visualized using the ``VarDumper ``.
109
+
110
+ If the dumper is used on a command line, the result is a formatted string.
111
+ Otherwise, the result is a piece of HTML, which can be expanded to show nested
112
+ structures in the dumped value.
You can’t perform that action at this time.
0 commit comments