I have a utility class with a static function that utilizes a global variable:

```
private static function isRateLimited($ip) {
    global $memcached_node;

    $memcache = new Memcache;
    $memcache->connect($memcached_node['host'], $memcached_node['port']) or die ("memcache failure");

    // do stuff
}

```

The global variable is set up via a chef cookbook. Everything has been working well within the application until a recent change. The change tweaked code execution so that `isRateLimited()` is called twice during a single web request. 

Debugging has revealed that, the first time `isRateLimited()` is called, the global variable is set and everything work as expected. However, the second time `isRateLimited()` is called, the global variable returns an empty value (as tested with `empty()`). The result is that the second connection to memcached fails.

The global is not overwritten or unset anywhere else in the code. **Why does the global variable lose its value between executions of the function in the same web request?**

For reference, I tried referring to the global using `$memcached_node = $GLOBALS["memcached_node"];` as one of my "last ditch effort" darts. The behavior was the same.

Environment
-----------

* PHP 5.3.4 (cli) (built: Jan 21 2011 00:08:14)
* nginx 1.0.6