php: when need to use unset() function -


<?php $str = 'hello world!'; echo $str; unset($str); ?> 

question:

when need use unset()? above script, think not necessary use it. wonder in situation need use it?

i use when deleting sessions...

unset($_session['user']); 

Comments