I have some code that i want to be executed in a PHP script, but i don't want the variable created in this script to be visible otherwhere.
What i would like to do is like we can do using JavaScript :
(function() {
// Do some stuff
})();
But i'd like to do this with PHP.
I've imagined the following code :
$main = function()
{
global $main;
unset($main);
// Do some stuff
}
$main();
BUt it's not supported before PHP 5.3, and i need it to be.
Is there another way to do this with PHP 5.2 ?
Thanks in advance :)