PHP Passing by reference
<p>Lets assume the following:</p>

<pre><code>private $array = array(/*really big multi-dimensional array*/);

public function &amp;func1($specific_large_sub_array_key)
{
     return $this-&gt;array[$specific_large_sub_array_key]
}

public function func2()
{
    $specificArray = &amp;$this-&gt;func1(1);

    $this-&gt;func3($specificArray);
}


public function func3($specificArray)
{
    /* do stuff here*/
}
</code></pre>

<p>My question is this:</p>

<p>If func3 does not specify that $specificArray is not passed by reference to it, does PHP make a copy of $specificArray when it calls func3 inside of func2? Or does PHP keep the reference and propagate it automatically?</p>

<p>i.e. Will this...</p>

<pre><code>public function func3($specificArray)
{
    unset($specificArray[234]);
}
</code></pre>

<p>...affect $array?</p>

<p>Thank you</p>

<p>Note, this example is extremely simplified.</p>
