Confirmation that PHP static variables do not persist across requests
<p>I am looking for assurance that static variables are NOT stored between PHP requests. The following previous questions:</p>

<p><a href="http://stackoverflow.com/questions/601307/php-static-variables-across-multiple-php-pages">PHP static variables across multiple .php pages</a></p>

<p><a href="http://stackoverflow.com/questions/520132/does-static-variables-in-php-persist-across-the-requests">Does static variables in php persist across the requests?</a></p>

<p><a href="http://stackoverflow.com/questions/2472201/php-static-variables-across-sessions">Php static variables across sessions</a></p>

<p>clearly say that they aren't but they are more in the context of providing a way to maintain state rather than a specific discussion of what is the expected behaviour.</p>

<p>As an example, if I have PHP code as follows:</p>

<pre><code>function myfunc()
{
    static $a=0;
    print $a++;
}

for ($i=0;$i&lt;10;$i++) myfunc();
</code></pre>

<p>then I get output of 0123456789 every time I run it. My instinct/understanding of PHP makes me fairly sure that this has to be the case.</p>

<p>In my own experiments, I've shut a (preforking) apache down to one child to make sure that the variable isn't remembered between requests. It isn't remembered between requests as I'd expect. But this is only one scenario in which PHP runs.</p>

<p>What I'm looking for is:</p>

<p>A link to an official piece of documentation that says this is the expected behaviour and won't change. The relevant piece of <a href="http://php.net/manual/en/language.variables.scope.php" rel="nofollow">PHP documentation</a> doesn't mention this explicitly (except in the comments).</p>

<p>Or, an example of when static variables are remembered across requests such as webservers or performance enhancing PHP frameworks out there which will potentially not clear static variables to increase speed between requests.</p>
