I am new to PHP, and I tried to dynamically instantiate a class like this:
$var = new \App\$str;
But I keep getting this error:
unexpected variable $str after '\', expected: identifier.
I know it is possible, but I am just not sure what the exact syntax is, all the examples I found are without the \App\ part which I need.
$var = new \App\{$str};