Files
smarty/docs/designers/language-modifiers/language-modifier-debug-print-var.md
Simon Wisselink 41d80b99ac Implemented support for substr, implode and json_encode as modifiers. (#940)
* Implemented support for substr, implode and json_encode as modifiers. Fixes #939
* Added split and join in favor of explode and implode modifiers.
* Documented all available modifiers
2024-02-26 14:35:19 +01:00

934 B

debug_print_var

Returns the value of the given variable in a human-readable format in HTML. Used in the debug console, but you can also use it in your template while developing to see what is going on under the hood.

Note

Use for debugging only! Since you may accidentally reveal sensitive information or introduce vulnerabilities such as XSS using this method never use it in production.

Basic usage

{$myVar|debug_print_var}

Parameters

Parameter Type Required Description
1 int No maximum recursion depth if $var is an array or object (defaults to 10)
2 int No maximum string length if $var is a string (defaults to 40)