How to handle global variables to be tha same for all users in PHP? : <p>I want to create simple multiplayer game with php using global variables that will be shared among all users, without using sockets.</p>

<p>I tried write php server that have on global variable called "connections" and code to handle GET request with url parameter that called "myName".
when the user send the GET request to the php server, "connections" is incremented and sent back to the user as the GET response.</p>

<pre><code>&lt;?php
    $connections = 0;
    if(isset($_GET['myName'])) {
        $connections = $connections+ 1;
        echo json_encode($connections);
        exit();
    }
?&gt;
&lt;html&gt;
    &lt;head&gt;
    &lt;/head&gt;
        &lt;body&gt;
        &lt;form action="Test/testServer.php"&gt;
            &lt;input type="text" name="myName"&gt;
            &lt;input type="submit" value="submit"&gt;
        &lt;/form&gt;
    &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>I am new to php and perhaps i missing something about how php server is actually work. I expected the "connections" to be the number of connected users that send GET request along all the "server life".</p>
