Re: register globals -> PHP6 still replaces . in variables from outside

From: Date: Tue, 11 Nov 2008 21:10:24 +0000
Subject: Re: register globals -> PHP6 still replaces . in variables from outside
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-41856@lists.php.net to get a copy of this message
Sorry for bringing an old thread back to life, but imo this needs some more attention. Sebastian wrote: > hi, > > PHP6 still replaces "." with an underscore in variables from outside. this > is an old behavior forced by register globals so i would say its a bug since > "." is valid in array keys. > > for sample: > > call a script like http://www.example.com/?my.var=1 > > now $_GET will look like this: > > Array ( [my_var] => 1) > > Thanks > It's a valid HTML input name attribute character [1] and imo the replacement feature (where ' ' and '.' characters are replaced to '_') should be removed in PHP 6, when the register_globals feature is removed. There will be PHP applications that need changing, but I estimate that it will be fixed easily. And since PHP 6 is breaking a lot anyway, what other version would be more suitable to change this. [1] - http://www.w3schools.com/TAGS/att_input_name.asp - Mark

« previous php.internals (#41856) next »