In PHP 5 can I instantiate a class dynamically? May 23, 2023 by Tarik That should work, yes. You can also do: $f = new $class($arg1,$arg2);