Here is a result of a random var_dump($GLOBALS)
:
array(6) {
["_GET"] => array(0) {}
["_POST"] => array(0) {}
["_COOKIE"]=> array(1) {
["PHPSESSID"]=> string(26) "o8f2mggog45mq9p5ueafgu5hv6"
}
["_FILES"] => array(0) {}
["GLOBALS"] => array(6) {
["_GET"] => array(0) {}
["_POST"] => array(0) {}
["_COOKIE"] => array(1) {
["PHPSESSID"] => string(26) "o8f2mggog45mq9p5ueafgu5hv6"
}
["_FILES"] => array(0) {}
["GLOBALS"]=>
*RECURSION*
["_SESSION"]=> &array(1) {
["somestrings"]=> string(16) "someotherstrings"
}
}
["_SESSION"] => &array(1) {
["somestrings"] => string(16) "someotherstrings"
}
}
I'm new to PHP and don't understand why PHP need to do that? Won't it use more storage?