GET/POST whitespace stripping behavior
| From: | Christopher Kunz | Date: | Mon, 08 Aug 2005 13:37:53 +0000 |
| Subject: | GET/POST whitespace stripping behavior | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-17606@lists.php.net to get a copy of this message | ||
Hi,
I have a general question in regard to the PHP variable normalizing. Obviously, leading whitespace in a variable is stripped, but why is trailing whitespace converted to underscores?
Example:
/?foo=bar&+fooo=blah&foooooo+=ljalskdf
results in:
array(3) {
["foo"]=>
string(3) "bar"
["fooo"]=>
string(4) "blah"
["foooooo_"]=>
string(8) "ljalskdf"
}
I can understand why one would want to convert middle spaces (like in "foo+bar") to underscores, but shouldn't trailing spaces be stripped instead? Am I missing something?
Regards,
--ck