Doc #61893 [NEW]: The $_REQUEST Predefined Variable Does NOT Contains the Contents of $_COOKIE

From: Date: Wed, 02 May 2012 01:11:32 +0000
Subject: Doc #61893 [NEW]: The $_REQUEST Predefined Variable Does NOT Contains the Contents of $_COOKIE
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-8320@lists.php.net to get a copy of this message
From: Operating system: Windows XP Prof PHP version: 5.3Git-2012-05-02 (Git) Package: Documentation problem Bug Type: Documentation Problem Bug description:The $_REQUEST Predefined Variable Does NOT Contains the Contents of $_COOKIE 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 bug report at https://bugs.php.net/bug.php?id=61893&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=61893&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=61893&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=61893&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=61893&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=61893&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=61893&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=61893&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=61893&r=needscript Try newer version: https://bugs.php.net/fix.php?id=61893&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=61893&r=support Expected behavior: https://bugs.php.net/fix.php?id=61893&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=61893&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=61893&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=61893&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=61893&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=61893&r=dst IIS Stability: https://bugs.php.net/fix.php?id=61893&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=61893&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=61893&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=61893&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=61893&r=mysqlcfg

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