SyntaxFix
Write A Post
Hire A Developer
Questions
Put the classname into a variable first:
$classname=$var.'Class'; $bar=new $classname("xyz");
This is often the sort of thing you'll see wrapped up in a Factory pattern.
See Namespaces and dynamic language features for further details.