Variables are stored in memory, and as soon as the script is finished, the memory is freed and they are destroyed and cannot be restored. There is no need to call unset()
on them, as this happens implicitly when the script exits.
Temporary files created when loading files that appear in the $_FILES
array should be deleted as soon as the script is completed, but if you want to be sure of this, you can call unlink()
on them.
As long as you do not store sensitive data in $_SESSION
, cookies, or anything else that is clearly persistent, you should be fine.
If you need to save some data on the server, you can encrypt it, for example, Mcrypt .
source share