Reply to php memory questions

Your name:

Reply:


Posted by cmills28 on 07/05/06 00:23

I'm using php 4.3, and I"m wondering when is it a good idea to use this
unset() function to free a variable?

Also, what happens internally when a variable is set in one place, then
reset in another -- for instance:

$a = "some string";

and later on in the script I have:

$a = "a different string";

What happens to "some string" -- is it still floating around in memory
(without any references to it)? Or is it garbage collected & memory
freed? Should I use unset($a) to free "some string" before resetting
$a to something different?

Thanks.
Chris

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация