note 17371 deleted from language.variables.scope by jimw

From: Date: Sat, 08 Dec 2001 21:22:33 +0000
Subject: note 17371 deleted from language.variables.scope by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-22213@lists.php.net to get a copy of this message
regarding brunosjunk@hotmail.com's post of 15-Jun-2001 12:24 exclaiming: $LOCALS = get_defined_vars(); And Vi-ola! Now there's a "$LOCALS" array. This does not solely return local variables. Querystrings, posts, cookies, etc. get sucked in as well. This is unfortunate as it makes being sure a variable was defined in your script (local variable) a terrible process of elimination. If anyone has a better way to this I would love to know: if (isset($memberaccess)&&!isset($HTTP_POST_VARS["memberaccess"])&&!isset($HTTP_GET_VARS["memberaccess"])&&!isset($HTTP_COOKIE_VARS["memberaccess"])) { echo "Yo, wussup world? How y'all membuz hangin'?!"; }

« previous php.notes (#22213) next »