// Way #1
$className = "AppMyClass";
$instance = new $className();
// ----------------------
// Way #2
$className = "AppMyClass";
$class = new ReflectionClass($className);
// Create a new Instance without arguments:
$instance = $class->newInstance();
// Create a new Instance with arguments (need a contructor):
$instance = $class->newInstanceArgs(["Banana", "Apple"]);