note 21443 deleted from function.extract by sniper

From: Date: Sun, 13 Jul 2003 03:24:23 +0000
Subject: note 21443 deleted from function.extract by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-52009@lists.php.net to get a copy of this message
Note Submitter: destes (at) ix.netcom.com ---- Extract provides an invaluable way to get around the possibility of the PHP directive register_globals being off or on. If you're used to register_globals being on, and you're worried that new PHP 4.2.0 implementations will mess up existing code (because it now defaults to off), try using this: if (!empty($_GET)) { extract($_GET); } else if (!empty($HTTP_GET_VARS)) { extract($HTTP_GET_VARS); } if (!empty($_POST)) { extract($_POST); } else if (!empty($HTTP_POST_VARS)) { extract($HTTP_POST_VARS); } That's from PHPMyAdmin (to give proper credit), and the same thing would probably be useful elsewhere. Thanks, Steve

« previous php.notes (#52009) next »