note 44140 deleted from function.unset by nlopess

From: Date: Fri, 16 Jul 2004 09:12:23 +0000
Subject: note 44140 deleted from function.unset by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-73358@lists.php.net to get a copy of this message
Note Submitter: gearond@doagoogletofindme.net ---- I found that it's not possible to unset( $some_super_or_normally_globalized_variable). Kinda ruined my day, since I was removing all the superglobals into an artificial page environment object and filetering them en masse. And assigning NULL to them ISN'T deleting them. So what to do? Easy, I found out, (and I didn't see this in the online manual). Assign an unset variable to the superglobal. Example(replace all '.' with spaces if you want to try it: class myclass{ ....var $local_GET; ....function myclass(){ ........$unset_variable; ........$this->local_GET=$_GET; ........$_GET=$unset_variable; ....} }

« previous php.notes (#73358) next »