Doc #61893 [Opn->Wfx]: The $_REQUEST Predefined Variable Does NOT Contains the Contents of $_COOKIE

From: Date: Wed, 02 May 2012 01:22:05 +0000
Subject: Doc #61893 [Opn->Wfx]: The $_REQUEST Predefined Variable Does NOT Contains the Contents of $_COOKIE
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-8321@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=61893&edit=1

 ID:                 61893
 Updated by:         aharvey@php.net
 Reported by:        marcoscanrib at ig dot com dot br
 Summary:            The $_REQUEST Predefined Variable Does NOT Contains
                     the Contents of $_COOKIE
-Status:             Open
+Status:             Wont fix
 Type:               Documentation Problem
 Package:            Documentation problem
 Operating System:   Windows XP Prof
 PHP Version:        5.3Git-2012-05-02 (Git)
 Block user comment: N
 Private report:     N

 New Comment:

The documentation already states clearly that that's the default behaviour only 
and can be changed via variables_order and request_order.


Previous Comments:
------------------------------------------------------------------------
[2012-05-02 01:11:32] marcoscanrib at ig dot com dot br

Description:
------------
---
From manual page: http://www.php.net/reserved.variables.request#refsect1-
reserved.variables.request-description
---


Test script:
---------------
<?php
// set the cookies
setcookie("CookieName1", 1);
setcookie("CookieName2", "two");
setcookie("CookieName3", "Cookie 3");
?>

// prints the elements of the $_COOKIE array
<pre>
<?php print_r($_COOKIE); ?>
</pre>

// prints the elements of the $_REQUEST array
<pre>
<?php print_r($_REQUEST); ?>
</pre>

Expected result:
----------------
IF the $_REQUEST predefined array contained the contents of the $_COOKIE 
predefined array, as stated at 
http://docs.php.net/manual/en/reserved.variables.request.php,
the above script 
should display : 

Array
(
    [CookieName1] => 1
    [CookieName2] => two
    [CookieName3] => Cookie 3
)
Array
(
    [CookieName1] => 1
    [CookieName2] => two
    [CookieName3] => Cookie 3
)


Actual result:
--------------
The above script displays, that clearly demonstrate that $_REQUEST does NOT 
contain the contents of $_COOKIE. I consider the real content of the $_REQUEST 
array fine, better than if it also included the contents of the $_COOKIE array. 
For me, only the documentation is wrong and should be corrected, what is very 
easy indeed.

Array
(
    [CookieName1] => 1
    [CookieName2] => two
    [CookieName3] => Cookie 3
)
Array
(
)




------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=61893&edit=1


Thread (7 messages)

« previous php.doc.bugs (#8321) next »