Is it possible to make a function that unsets a variable when it is used X time(s)?
I’m aware of unset() and how it works.
This would be handy for the security sake.
For example to automaticlly unset personal information that I obtained from a MySQL database, having 1000-2000 unset() in the code just looks so messy!
Although your question doesn’t make perfectly sense here’s a possibility to do it:
How to use:
Mostly if you begin to think about stuff like this you’re on the wrong way. It sometimes helps to take a step back and figure out what the real problem is. Your problem is not really that there is not a good possibility to expire your variables.