#42582 [Opn]: get_defined_vars does not show _SERVER
ID: 42582
User updated by: thegreatall at gmail dot com
Reported By: thegreatall at gmail dot com
Status: Open
Bug Type: Unknown/Other Function
Operating System: Windows XP Pro
PHP Version: 5.2.4
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[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
Thread (3 messages)