Jump to content

Var Template dump


hankii
 Share

Go to solution Solved by Adriano Faria,

Recommended Posts

  • 1 month later...
{expression="var_export($variable, true)"}

I use the above. var_dump does not return a result. it literally just prints to screen.

On 1/23/2018 at 2:22 PM, opentype said:

{{$varoutput=var_dump($variable);}}
{$varoutput}

I always do it like this. 

To clarify, the second line there, and indeed, setting the $varoutput variable itself, is a meaningless no-op because var_dump was used.

{{var_dump($variable);}}

is the exact same thing as the code you posted.

I prefer var_export both for control of placement of result and because I have seen var_dump do nothing on some servers due to the output buffering used in the suite, thus var_export consistently gives me the debug i'm looking for without fighting install-specific semantics.

Edited by Marcher Technologies
Link to comment
Share on other sites

  • 2 weeks later...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...