Assigning array parameter in constructor
<p>Now i am coming in a circumstance like, i need to pass a parameter for array in a function(So that i can override it in the function based on my needs). So how is that possible in PHP. For eg.,</p>

<pre><code>class classname
{
    function __construct()
    {
        $array['default'] = 'default value';
    }

    function test()
    {
        $array['a'] = 'a';
        $array['b'] = 'b';
    }
}
</code></pre>

<p>I need to get the <code>$array['default']</code> in the function test. So how to do that in PHP? Any help on this would be greatly appreciated.</p>
