In PHP, I get a dump of all variables like so:
var_dump(get_defined_vars());
However, in one particular application one of the variables is huge and I would really like to avoid printing it out. I could foreach over the get_defined_vars() array to create a new array and blacklist the problematic variable, but if there is a better way then I would love to know about it.
Thanks.
1 Answer