Re: unset array here?

From: Date: Fri, 26 Jul 2002 17:26:43 +0000
Subject: Re: unset array here?
Groups: php.general 
Request: Send a blank email to php-general+get-109826@lists.php.net to get a copy of this message
>Hello, > >I have this example code: >function doprint($a){foreach($a as $value)echo $value;} >doprint(array('1','test','hello','and')); > >Question, is the array in memory after the function call? >So, should it be better to use this: > >function doprint($a){foreach($a as $value)echo $value;} >doprint($temp=array('1','test','hello','and')); >unset($temp); PHP 4 is very aggressive about reclaiming memory. Don't bother with the unset, unless your array is *HUGE* and you really need it gone immediately... Even then, I suspect you won't find any difference. -- Like Music? http://l-i-e.com/artists.htm I'm looking for a PRO QUALITY two-input sound card supported by Linux (any major distro). Need to record live events (mixed already) to stereo CD-quality. Soundcard Recommendations? Software to handle the recording? Don't need fancy mixer stuff. Zero (0) post-production time. Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo audio-to-disk.

« previous php.general (#109826) next »