I work in a PHP shop where common practice is to simply setup variables, file pointers, etc. Then let garbage collection take care of them once the script has ended.
In a number of online applications however, I have found that letting php garbage collection take care of releasing memory slows the script down significantly. As it happens many of these use either a huge number of variables or variables which take up a huge amount of memory. Using unset($var) speeds these up significantly!
So is letting scripts end and php garbage collection take place slow a script down or is my use of the unset() function which speeding up my scripts just in my imagination and coincidence and not the rule of thumb?