Re: unset() and variables in functions

From: Date: Tue, 12 Sep 2000 19:26:17 +0000
Subject: Re: unset() and variables in functions
Groups: php.general 
Request: Send a blank email to php-general+get-16424@lists.php.net to get a copy of this message
>>> "Hans H. Anderson" <php@hansanderson.com> 09/12 3:09 PM >>> >>In an effort to make an intensive search script as efficient as possible, >> I was wondering: >> does unset() actually free the memory of that variable, or does it just >> empty it? >> after a function returns, user-defined or PHP-defined, are all the local >> variables in that function freed, or do I need to free them myself? In PHP 4 you don't have to worry about freeing variables, it's done for you automatically. If you want the inside details, read http://www.zend.com/zend/art/ref-count.php

« previous php.general (#16424) next »