#42582 [Opn]: get_defined_vars does not show _SERVER

From: Date: Fri, 07 Sep 2007 02:46:17 +0000
Subject: #42582 [Opn]: get_defined_vars does not show _SERVER
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-117255@lists.php.net to get a copy of this message
 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)

« previous php.bugs (#117255) next »