Richard Davey wrote:
unset($type);
$type = $_GET['action'];

(Please note - you don't HAVE to "unset" each variable, but if you are
working in a Register Globals ON environment, it's a good safety
measure).

I've seen a few people recommending this type of thing. Please explain how this is any safer than just setting $type to $_GET['action']. As far as I can tell it makes absolutely no difference. Basically you unset the variable and then assign something to it. If you weren't to unset it first it would still have the same effect. Seems like nothing more than a waste of cycles to me.


Or am I missing something weird about how PHP works?

--
Stuart

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to