note 26446 added to ref.array
| From: | jg at rack1 dot php dot net | Date: | Thu, 31 Oct 2002 02:27:54 +0000 |
| Subject: | note 26446 added to ref.array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-38805@lists.php.net to get a copy of this message | ||
It's not clear how memory is managed with arrays. For example, if you have some existing data
in an array and do:
$my_array=array();
Does it wipe all previous content? It should. Also, if you do
$my_array[0] = "";
It should release the memory for whatever stuff was there before.
If arrays are kept as linked lists as somebody here pointed out before, there is a significant
overhead on arrays with hundreds of elements. Is there anywhere I can find info on the way this
stuff is managed without browsing through the PHP source code?
--
http://www.php.net/manual/en/ref.array.php
http://master.php.net/manage/user-notes.php?action=edit+26446
http://master.php.net/manage/user-notes.php?action=delete+26446
http://master.php.net/manage/user-notes.php?action=reject+26446