<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # `dump` New in version 1.5: The `dump` function was added in Twig 1.5. The `dump` function dumps information about a template variable. This ismostly useful to debug a template that does not behave as expected byintrospecting its variables: <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre>{{ dump(user) }} </pre></div></td></tr></table> Note The `dump` function is not available by default. You must add the`Twig_Extension_Debug` extension explicitly when creating your Twigenvironment: <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1 2 3 4 5</pre></div></td><td class="code"><div class="highlight"><pre>$twig = new Twig_Environment($loader, array( 'debug' =&gt; true, // ... )); $twig-&gt;addExtension(new Twig_Extension_Debug()); </pre></div></td></tr></table> Even when enabled, the `dump` function won't display anything if the`debug` option on the environment is not enabled (to avoid leaking debuginformation on a production server). In an HTML context, wrap the output with a `pre` tag to make it easier toread: <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1 2 3</pre></div></td><td class="code"><div class="highlight"><pre>&lt;pre&gt; {{ dump(user) }} &lt;/pre&gt; </pre></div></td></tr></table> Tip Using a `pre` tag is not needed when [XDebug](http://xdebug.org/docs/display) [http://xdebug.org/docs/display] is enabled and`html_errors` is `on`; as a bonus, the output is also nicer withXDebug enabled. You can debug several variables by passing them as additional arguments: <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre>{{ dump(user, categories) }} </pre></div></td></tr></table> If you don't pass any value, all variables from the current context aredumped: <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre>{{ dump() }} </pre></div></td></tr></table> Note Internally, Twig uses the PHP [var_dump](http://php.net/var_dump) [http://php.net/var_dump] function. ### Arguments - `context`: The context to dump
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看