You're overcomplicating it a bit with the extra ${} bracketing on the class reference.
$myclass='myCLaSs';
$myObject = new $myclass();
$retval = $myObject->myFunction($stringvar, 1);
Or if you need to use call_user_func_array:
$args=array($stringvar,1);
$retval=call_user_func_array(array($myObject, 'myFunction'), $args);
When you use the ${} bracketing, you are referencing variables by a variable name. For example:
$myVariable = "A";
$aVariableThatIsHoldingAVariableName = "myVariable";
echo ${$aVariableThatIsHoldingAVariableName}; // outputs "A".
Applying this to your code shows the following logic happening:
Set the variable $myclass equal to the string 'myclass'
$myclass='myclass';
Set the variable ${$myclass}:
This gets the value of the variable $myclass ('myclass') and uses that as the variable name. In other words, the following variable name resolution happens: ${$myclass} => ${'myclass'} => $myclass.
So this line sets $myclass to a new Myclass(); object:
${$myclass}=new ucfirst($myclass);
The first parameter to call_user_func_array is a callable (See https://www.php.net/manual/en/language.types.callable.php). The callback it looks like you are trying to reference here is Type 3: array($object, $method). But the same variable resolution happens. Now, ${$myclass} is going to resolve differently, because the value of $myclass is a Myclass Object. Variable names have to be strings, not objects (obviously), so ${Myclass Object} is totally invalid.
$args=array($stringvar,1);
$retval=call_user_func_array(array(${$myclass}, 'myFunction'), $args);
But since $myclass at that point is an object already, you can just do the following (as mentioned initially above):
$retval=call_user_func_array(array($myclass, 'myFunction'), $args);