note 18151 added to language.variables.external

From: Date: Sat, 12 Jan 2002 03:25:24 +0000
Subject: note 18151 added to language.variables.external
Groups: php.notes 
Request: Send a blank email to php-notes+get-24729@lists.php.net to get a copy of this message
I think the quickest way to convert the HTTP arrays to global vars in the newer versions of PHP is to use the extract() function. http://www.php.net/manual/en/function.extract.php For example: if (isset($HTTP_GET_VARS)) { extract($HTTP_GET_VARS); } The point of doing that - even when register_globals is on - is for portability, so you can move your scripts to any server and they will work even if you (or your client) can't control the php.ini config. Ya never know when your server might blow up and you have to temporarily use a shared server, for example. -Kenric -- http://www.php.net/manual/en/language.variables.external.php http://master.php.net/manage/user-notes.php?action=edit+18151 http://master.php.net/manage/user-notes.php?action=delete+18151 http://master.php.net/manage/user-notes.php?action=reject+18151

« previous php.notes (#24729) next »