#37040 [NEW]: autoconversion of variabel names should be turned off

From: Date: Tue, 11 Apr 2006 13:49:26 +0000
Subject: #37040 [NEW]: autoconversion of variabel names should be turned off
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-95601@lists.php.net to get a copy of this message
From:             indeyets at gmail dot com
Operating system: FreeBSD 5.4
PHP version:      5.1.2
PHP Bug Type:     Feature/Change Request
Bug description:  autoconversion of variabel names should be turned off

Description:
------------
Currently, PHP does autoconversion of 'dots' in external variable names to
'underscores'. It is documented here: http://ru.php.net/variables.external

It does make sense when application has register_globals enabled and
prevents losing of incorrectly named variables.

Though, it doesn't make sense when register_globals setting is disabled.
In this mode, all external variables are placed inside of associative
array, and 'dot' is just as legal for the key-name as 'underscore' is

Reproduce code:
---------------
<?php
    echo '<a
href="'.$_SERVER["SCRIPT_NAME"].'?var.name=value">test</a><hr>';
    echo '<pre>';
    var_dump($_GET);
    echo '</pre>';
?>


Expected result:
----------------
array(1) {
  ["var_name"]=>
  string(5) "value"
}

Actual result:
--------------
array(1) {
  ["var.name"]=>
  string(5) "value"
}

-- 
Edit bug report at http://bugs.php.net/?id=37040&edit=1
-- 
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37040&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=37040&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37040&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=37040&r=fixedcvs
Fixed in release:             http://bugs.php.net/fix.php?id=37040&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=37040&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=37040&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=37040&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=37040&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=37040&r=notwrong
Not enough info:              http://bugs.php.net/fix.php?id=37040&r=notenoughinfo
Submitted twice:              http://bugs.php.net/fix.php?id=37040&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=37040&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=37040&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=37040&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=37040&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=37040&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=37040&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=37040&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=37040&r=mysqlcfg


Thread (6 messages)

« previous php.bugs (#95601) next »