note 45261 deleted from function.array-pop by sp
| From: | sp@php.net | Date: | Tue, 31 Aug 2004 16:00:35 +0000 |
| Subject: | note 45261 deleted from function.array-pop by sp | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-75753@lists.php.net to get a copy of this message | ||
Note Submitter: cam at wecreate dot com
----
Elf:
You need not use array_pop to clear an array. Just use Unset. You can unset individual elements in
an array if you know the key, or you can unset the whole array simply by doing:
unset($array_name); // frees the memory (immediately?)
and/or
$array_name = array(); // makes a new one of the same name, nuking the old one at garbage cleanup.
Don't do more than you have to :)