Skip to content

Commit dd715fc

Browse files
author
Henry Snoek
committed
dd() helper method tip
1 parent 3fe1b2a commit dd715fc

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

components/var_dumper.rst

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,14 @@ current PHP SAPI:
8282
#. From time to time, run ``composer global update symfony/var-dumper``
8383
to have the latest bug fixes.
8484

85+
.. tip::
86+
87+
The VarDumper component also has a ``dd()`` helper method. This dump and die
88+
functionality will call ``dump()`` and ``exit()``.
89+
90+
.. versionadded:: 4.1
91+
The ``dd()`` helper method was introduced in Symfony 4.1.
92+
8593
DebugBundle and Twig Integration
8694
--------------------------------
8795

@@ -93,8 +101,9 @@ of your application may just break it by e.g. sending HTTP headers or
93101
corrupting your view, the bundle configures the ``dump()`` function so that
94102
variables are dumped in the web debug toolbar.
95103

96-
But if the toolbar cannot be displayed because you e.g. called ``die``/``exit``
97-
or a fatal error occurred, then dumps are written on the regular output.
104+
But if the toolbar cannot be displayed because you e.g. called
105+
``die``/``exit``/``dd`` or a fatal error occurred, then dumps are written on
106+
the regular output.
98107

99108
In a Twig template, two constructs are available for dumping a variable.
100109
Choosing between both is mostly a matter of personal taste, still:

0 commit comments

Comments
 (0)