In PHP 5 can I instantiate a class dynamically?
Solution 1:
That should work, yes.
You can also do:
$f = new $class($arg1,$arg2);
Solution 2:
Yes, this code will work fine.
Solution 3:
In PHP 5 can I instantiate a class dynamically?
Yes you can, your code should work fine.