Key values starting with .
| From: | Brian France | Date: | Thu, 27 Jun 2002 15:32:51 +0000 |
| Subject: | Key values starting with . | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-85632@lists.php.net to get a copy of this message | ||
Hello,
I have a url that ends with ?.value=1, but PHP returns this in $_REQUEST as _value instead of .value. I believe this is because of this code:
main/php_variables.c
104 /* ensure that we don't have spaces or dots in the variable name (not binary safe) */
105 for (p=var; *p; p++) {
106 switch(*p) {
107 case ' ':
108 case '.':
109 *p='_';
110 break;
111 }
112 }
I can do this: $_REQUEST['.name'] = "testing" then if I do print_r($_REQUEST) prints it out as .value and not _value. Any reason for being able to do one, but not the other? Also what is the "(not binary safe)" part of a variable with a . in its name?
Thanks,
Brian