A variable references bug?
<p>I have a cannot understand problem, the following code why is print  Array ( [a] => 1 [b] => 2 [c] => 3 [d] => ) , I didn't change the $info variable but why it changed?</p>

<pre><code>&lt;?php
function ifSetOr(&amp;$a, $b = null) {
    return isset($a) ? $a : $b;
}

$info = array('a' =&gt; 1, 'b' =&gt; 2, 'c' =&gt; 3);
ifSetOr($info['d']);
print_r($info); //Array ( [a] =&gt; 1 [b] =&gt; 2 [c] =&gt; 3 [d] =&gt; ) 
?&gt;
</code></pre>
