title: In PHP 5 can I instantiate a class dynamically?
body: <p>Is it possible to dynamically instantiate a class using a variable? For example is something like this possible in PHP?</p>
  
  <pre><code>class foo
  {
      public $something;
  }
  
  $class_name = "foo";
  
  $f = new $class_name();
  </code></pre>