#42582 [Opn->Bgs]: get_defined_vars does not show _SERVER
| From: | jani@php.net | Date: | Fri, 07 Sep 2007 08:44:02 +0000 |
| Subject: | #42582 [Opn->Bgs]: get_defined_vars does not show _SERVER | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-117260@lists.php.net to get a copy of this message | ||
ID: 42582
Updated by: jani@php.net
Reported By: thegreatall at gmail dot com
-Status: Open
+Status: Bogus
-Bug Type: Unknown/Other Function
+Bug Type: *General Issues
Operating System: Windows XP Pro
PHP Version: 5.2.4
New Comment:
This is called "JIT". (look for auto_globals_jit in php.ini-dist for
example..)
Previous Comments:
------------------------------------------------------------------------
[2007-09-07 02:46:16] thegreatall at gmail dot com
Sorry I forgot to say that I had this problem while running it under
IIS5 (ISAPI), I am not sure if it will reproduce the same in Apache; but
it doesn't happen in the command line.
------------------------------------------------------------------------
[2007-09-07 02:41:51] thegreatall at gmail dot com
Description:
------------
If I have code that does a simple print_r() on get_defined_vars() it
should echo out all the variables defined including _SERVER, however it
acts as if _SERVER does not even exist. If you put "$_SERVER;" anywhere
in the script it will act correct.
I have also found this problem exists very similer to _ENV also.
Reproduce code:
---------------
<?php
print_r(get_defined_vars());
//$_SERVER; // uncomment this to see another result
?>
Expected result:
----------------
it should also show the _SERVER and _ENV vars, but it doesnt
Actual result:
--------------
does not display the _SERVER or _ENV vars.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42582&edit=1