pointer - Global variable value lost inside func
<p>please see the code below:</p>

<pre><code>global $global_p, $global_var;
$global_var="lorem";
$global_p=&amp;$global_var;

function myfunc () {
    global $global_p, $global_var;
    var_dump($global_p);
    var_dump($global_var);
}

myfunc();
</code></pre>

<p>Output:</p>

<p>for var_dump($global_p) - NULL</p>

<p>for var_dump($global_var) - string(5) "lorem"</p>

<p>Why var_dump($global_p) - NULL ?</p>

<p>How can I keep the value globally?</p>

<p>Thanks in advance.</p>

<p>If I will pass $global_p as a function parameter - it works. But I need $global_p as a global var only.</p>
