@dump - Debugging Variables
The @dump
directive in Ahmed PHP Template Engine allows you to output detailed information about variables for debugging purposes. It is similar to PHP's var_dump()
but formatted for better readability within the template.
Syntax
variable
is the variable you want to inspect.It prints the value and type of the variable directly within the template.
Example
Output
Notes
@dump
is useful for debugging arrays, objects, and other complex data structures.It should be removed in production templates to avoid exposing internal data.
Can be combined with
@set
for testing variable values.
Last updated