Re: register globals -> PHP6 still replaces . in variables from outside
| From: | Davey Shafik | Date: | Tue, 11 Nov 2008 22:05:35 +0000 |
| Subject: | Re: register globals -> PHP6 still replaces . in variables from outside | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-41858@lists.php.net to get a copy of this message | ||
On Nov 11, 2008, at 04:10 PM, Mark van der Velden wrote:
Sorry for bringing an old thread back to life, but imo this needs some more attention. Sebastian wrote:Not to be pedantic, and really, it further supports your case, the W3C spec for HTML, specifies that the name attribute is simply CDATA, therefore anything is valid. It also says it's case-insensitive also, however I doubt that could be handled in any non-impactful way. - Daveyhi, 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) ThanksIt'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