Is it possible to dynamically instantiate a class using a variable? For example is something like this possible in PHP?
class foo { public $something; }
In PHP 5 can I instantiate a class dynamically?
Yes you can, your code should work fine.