Re: Re: PHP 4.0 Bug #5289 Updated: Use of reset on a global

From: Date: Fri, 30 Jun 2000 17:30:33 +0000
Subject: Re: Re: PHP 4.0 Bug #5289 Updated: Use of reset on a global
Groups: php.dev 
Request: Send a blank email to php-dev+get-23106@lists.php.net to get a copy of this message
Addressed to: alan.frostick@iconmedialab.com php-dev@lists.php.net ** Reply to note from Alan Frostick <alan.frostick@iconmedialab.com> Fri, 30 Jun 2000 13:07:26 +0200 > > Yes Rick, I thought of that one myself last night (are we telepathic?) > > Can anyone tell me if there's any memory penalty in doing this instead > of using unset()? (the arrays iteratively replaced could be quite > chunky). I don't think so. If there are no other referenced to the old array PHP's reference conter should identify the fact that the old values are no longer being used, and delete them. > If there is no downside, replacing the arrays by simple re-assignment > to an empty array would be the best solution. It remains a difference > between php3 and php4, meaning I have to devise a global search for > any such use of unset() in all my projects... from the shell prompt, in the directory with your source: grep unset * grep - search unset - for 'unset' * - in all files in this directory see man grep for more. (much more) Rick Widmer Internet Marketing Specialists http://www.developersdesk.com

« previous php.dev (#23106) next »