#29799 [Opn->Bgs]: extract performs urldecode?
| From: | vrana@php.net | Date: | Thu, 30 Dec 2004 08:57:00 +0000 |
| Subject: | #29799 [Opn->Bgs]: extract performs urldecode? | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969365707@lists.php.net to get a copy of this message | ||
ID: 29799
Updated by: vrana@php.net
Reported By: cpuidle at gmx dot de
-Status: Open
+Status: Bogus
Bug Type: Documentation problem
Operating System: WinXP SP2
PHP Version: 5.0.1
New Comment:
extract() doesn't perform urldecode() as proves this test case:
<?php
extract(array("a" => "%70"));
echo $a; // %70
?>
$_REQUEST and similar variables already contain urldecoded data.
Previous Comments:
------------------------------------------------------------------------
[2004-12-29 18:44:35] mez@php.net
It's true that nowhere is it mentioned that any variables from outside
PHP will be automatically urldecode()'ed... but isn't this expected
behaviour? When you pass a variable, whether through POST, GET or
Cookies, don't you want that variable to be as it was sent, rather than
encoded?
I know this might be confusing for people coming from other languages
(such as Perl), but doesn't it make sense to have it that way?
------------------------------------------------------------------------
[2004-08-23 17:04:04] cpuidle at gmx dot de
Description:
------------
Running this code:
extract($_REQUEST);
the resulting (global) variables are url-decoded. I found that
$_REQUEST is already url-decoded and couldn't find any documentation?
Reproduce code:
---------------
.
Expected result:
----------------
make clean when url-decoding is performed.
Actual result:
--------------
.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29799&edit=1