How to create object from String?
<p>I tried the code below:</p>

<pre><code>$dyn = "new ". $className . "(" .$param1 . ", ". $param2 . ");";
$obj = eval($dyn);
</code></pre>

<p>It compiles but it's null.</p>

<p>How can you instance object in PHP dynamicaly?</p>
