today I asked myself how the variables look like at the end of my script. I mean I use variables, include scripts, make database requests… and I always try to care to unset the variables again when I don’t need them anymore. But to I get all… or does my script use more and more memory? And how can I control it?
PHP have also for this question a solution. get_defined_vars() shows all variables which are currently in use.
Call this function at the end (or somewhere between) and you know exactly which variables are in use and where you have to clean up.
Very nice :-)