There are several ways to get information about a variable, an array, or an object.
var_dump
The best way to begin is to use var_dump after calling the variable.
Another trick is to simply add an
print_r
Inserting print_r( $variable ) provides a cleaner view of the variable or array.
XenForo Specific
XenForo developers provide two simple ways to dump a variable.
var_dump
The best way to begin is to use var_dump after calling the variable.
PHP:
var_dump( $variable );
Another trick is to simply add an
exit;
line after the var_dump
.print_r
Inserting print_r( $variable ) provides a cleaner view of the variable or array.
XenForo Specific
XenForo developers provide two simple ways to dump a variable.
PHP:
\XF::dump($var);
\XF::dumpSimple($var);