My reasoning is that I read a full text file into an array and then extract various elements of it into certain variables. Once everything is extracted, the PHP script has many other things to do. However, there is no point in using up CPU memory during this latter phase, hence I want to empty the variable.
Originally posted by Snoozy PHP is smart, it’ll empty it on its own. Are you coming from ASP by any chance?
well, yeah, it’ll empty it after the script exits, if that’s what you mean. but it won’t empty it during the script, b/c you might use it still. and he wants to save memory during the rest of the script. that’s probably a good idea if it was a large array.