note 61771 deleted from reserved.variables by felipe
| From: | felipe@php.net | Date: | Sun, 30 Dec 2007 18:24:40 +0000 |
| Subject: | note 61771 deleted from reserved.variables by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-134354@lists.php.net to get a copy of this message | ||
Note Submitter: geza at turigeza dot com
----
Above the manual says
'$_REQUEST is an associative array consisting of the contents of $_GET, $_POST, and
$_COOKIE.'
However
$_REQUEST doesn't always contain the same elements as
$_GET+$_POST+$_REQUEST;
Basically if you add an element to the $_POST array that element does not automatically get added to
REQUEST as well. It's easy to understand why :)
<?php
$_POST['geza'] = 'geza';
$_GET['bela'] = 'bela';
echo '<pre>';
print_r($_POST);
print_r($_GET);
print_r($_REQUEST);
echo '</pre>';
?>
will output this
Array
(
[geza] => geza
)
Array
(
[bela] => bela
)
Array
(
)