mirror of
https://github.com/smarty-php/smarty.git
synced 2025-10-07 17:54:38 +02:00
* 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
934 B
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) |