Re: PHP6 cleanup: Request Variable handling for variables with spaces
| From: | Ilia Alshanetsky | Date: | Wed, 15 Nov 2006 17:44:46 +0000 |
| Subject: | Re: PHP6 cleanup: Request Variable handling for variables with spaces | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-26610@lists.php.net to get a copy of this message | ||
On 15-Nov-06, at 5:12 AM, Christopher Kunz wrote:
Hi all, I think I posted about this quite some time ago, but the issue is (as of PHP 5.2.0) still there: - Request variables that have leading whitespace are trimmed before being imported into the respective superglobal array. - Request variables that have trailing whitespace have all whitespace converted to _ before being imported into the respective superglobal array. I presume this is still from the good old day of register_globals where men where men and variables were autoglobal. Having a request variable with a space wasn't desirable back then ("$ foo - huh?!"), but since r_g is going to go in PHP6 anyway, wouldn't this be a good moment to change this behavior to what (at least AFAICT) other languages do?While I agree that the impact maybe low, there are people who depend on this behavior. Just because filtering modules/extension life would be much easier if spaces were left as is, does not seem like a particularly compelling reason to drop the behavior imho. Ilia Alshanetsky