Remove name mangling? (when creating variables from external sources)
| From: | Bishop Bettini | Date: | Tue, 06 Oct 2015 20:38:51 +0000 |
| Subject: | Remove name mangling? (when creating variables from external sources) | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-88708@lists.php.net to get a copy of this message | ||
Hi!
Currently dots and spaces are converted to underscores when pulling them in
from HTML:
<!-- php will only see two submitted values, b/c of mangling -->
<input type='file' name='file5.1' />
<input type='file' name='file5 1' />
<input type='file' name='file5_1' />
<input type='text' name='file5.1' />
<input type='text' name='file5 1' />
<input type='text' name='file5_1' />
Ostensibly[1], names were mangled to support import_request_variables and
register_globals. But curiously other characters that would create an
invalid variable aren't mangled:
<input type='text' name='file5$1' /> <!-- why not mangle $ also?
-->
There are already two bug requests out there asking to remove this behavior
or expose the original name: #34882 and #42055
Since 5.4.0 removed both import_request_variables and register_globals,
does this mangling serve any purpose? If not, can we remove it?
[1] http://php.net/manual/en/language.variables.external.php
[2] https://bugs.php.net/bug.php?id=34882
[3] https://bugs.php.net/bug.php?id=42055