> yes, you must use unset() to remove a variable, otherwise it will stay
> for the duration of the script.

Don't worry about memory management if you're going to use PHP.  The
point of using a high level language like PHP is you can just ignore
it.  Let's say you decided to:

if ($temp)
{ /*  something  */ }
unset $temp;     // save a couple bytes of memory

And you decided to reuse $temp a few weeks later:

if ($temp) // never will execute because you forgot you unset($temp);
{ /*  something  */ }

So unless you're dealing with an extreme scenario (i.e. a number of very
large mySQL queries), you probably don't need to worry.

-Dan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to