php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38953 unexpected input name of html modified in $_REQUEST
Submitted: 2006-09-25 17:33 UTC Modified: 2006-09-25 17:42 UTC
From: thbley at gmail dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 4.4.4 OS: Win32
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: thbley at gmail dot com
New email:
PHP Version: OS:

 

 [2006-09-25 17:33 UTC] thbley at gmail dot com
Description:
------------
The name of the input field name gets modified in the $_REQUEST field.

Array
(
    [192_168_0_4] => test
)

should be:
Array ( [192.168.0.4] => test ) 

I don't know if it's a bug, but I can't explain it any further by my knowledge.

Reproduce code:
---------------
<?php
  echo "<pre>";
  print_r($_REQUEST);
  echo "</pre>";
  
  echo "should be:<br>\n";
  print_r(array("192.168.0.4"=>"test"));
?>
<form method="get">
<input name="192.168.0.4" value="test">
</form>


Expected result:
----------------
Array
(
    [192.168.0.4] => test
) 

Actual result:
--------------
Array
(
    [192_168_0_4] => test
)



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-09-25 17:42 UTC] derick@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

PHP can\'t have variable names with .\'s in them (from the register_globals times). And we can\'t \"fix\" it either as that would break scripts now.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Dec 05 16:00:02 2025 UTC