any danger in overwriting $_GET ?
| From: | Justin French | Date: | Tue, 15 Jul 2003 02:21:17 +0000 |
| Subject: | any danger in overwriting $_GET ? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-155209@lists.php.net to get a copy of this message | ||
Hi,
Is there any danger in overwriting the $_GET array? Will it still remain a superglobal in all circumstances?
<?
// Example 1:
$_GET['foo'] = base64_decode($_GET['foo']); // modify a value
// Example 2:
$_GET = array(); // empty it
$_GET['myNewKey'] = 'something'; // re-populate
?>
I'm considering the "search engine friendly URL" methods discussed many times here and all over the web, but want to:
a) maintain using $_GET, to ensure speedy conversion of old scripts
b) maintain a certain level of familiarity in the way I (and others) write scripts
c) have the values as superglobals (ie, available within functions)
TIA
Justin French