View Single Post
Old 05-01-2008, 03:03 AM   #4 (permalink)
Salathe
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
Salathe is on a distinguished road
Default

That depends entirely on who you talk to. Generally there is no need to unset variables unless keeping them around is particularly expensive. For example, if you loaded a huge XML document (talking tens/hundreds of megabytes), images (GD), etc. into your script.

Just like the common advice is to close any open database connections (and free results) as soon as you're finished with them, it's a good idea to tidy up a bit but don't go over the top by unsetting everything.
Salathe is offline  
Reply With Quote