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

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to