What does this mean: $foo = new $foo();?
<p>I've never seen something like this before.</p>

<pre><code>$dbTable = new $dbTable();
</code></pre>

<p><strong>We are storing an Object Instance inside $dbTable ?</strong></p>

<p><strong>Are we transforming a string into an object ?</strong></p>

<p>Here's the context:</p>

<pre><code>protected $_dbTable;

    public function setDbTable($dbTable)
    {
        if (is_string($dbTable)) {
            $dbTable = new $dbTable();
        }
        if (!$dbTable instanceof Zend_Db_Table_Abstract) {
            throw new Exception('Invalid table data gateway provided');
        }
        $this-&gt;_dbTable = $dbTable;
        return $this;
    }
</code></pre>

<p>From php manual here:
<a href="http://www.php.net/manual/en/language.oop5.basic.php" rel="nofollow">http://www.php.net/manual/en/language.oop5.basic.php</a></p>

<p>We can read:</p>

<blockquote>
  <p>If a string containing the name of a
  class is used with new, a new instance
  of that class will be created. If the
  class is in a namespace, its fully
  qualified name must be used when doing
  this.</p>
</blockquote>

<p>But this seems to be a concatenation operation between a string and those "things": () - without using a dot. So I'm still not sure about what's going on here.</p>
