Using closures in an array
<p>I have a code similar to this:</p>

<pre><code>$name = '_DBR'; // This comes from a function call

$this-&gt;_Inits['_DBR'] = function () { return get_library('Database')-&gt;getConnection('users', 'read'); };

$inits = $this-&gt;_Inits[$name];
$result = $inits(); // ERROR: Function name must be a string

return $result;
</code></pre>

<p>The error I get is:</p>

<pre><code>Function name must be a string in xxxx
</code></pre>

<p>Is there any ways I could use an array to store multiple closures and is there a working way to access them?</p>

<p>I use PHP 5.4.3</p>
