unset array here?
| From: | Bas Jobsen | Date: | Thu, 25 Jul 2002 20:26:03 +0000 |
| Subject: | unset array here? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-109598@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);
Thanks,
Bas