diff --git a/components/var_dumper.rst b/components/var_dumper.rst index 884dcfb76c8..ffc087e8b14 100644 --- a/components/var_dumper.rst +++ b/components/var_dumper.rst @@ -82,6 +82,15 @@ current PHP SAPI: #. From time to time, run ``composer global update symfony/var-dumper`` to have the latest bug fixes. +.. tip:: + + The VarDumper component also includes a ``dd()`` helper method. This "dump + and die" feature calls ``dump()`` and stops the application immediately + after with ``exit()``. + + .. versionadded:: 4.1 + The ``dd()`` helper method was introduced in Symfony 4.1. + DebugBundle and Twig Integration -------------------------------- @@ -93,8 +102,9 @@ of your application may just break it by e.g. sending HTTP headers or corrupting your view, the bundle configures the ``dump()`` function so that variables are dumped in the web debug toolbar. -But if the toolbar cannot be displayed because you e.g. called ``die``/``exit`` -or a fatal error occurred, then dumps are written on the regular output. +But if the toolbar cannot be displayed because you e.g. called +``die()``/``exit()``/``dd()`` or a fatal error occurred, then dumps are written +on the regular output. In a Twig template, two constructs are available for dumping a variable. Choosing between both is mostly a matter of personal taste, still: