[PHP]Creating instance of dynamic class

$classPath = \explode("\\", __NAMESPACE__);
\array_pop($classPath);
$newPath = \implode("\\", $classPath) . "\\Drivers\\";
$className = $newPath . Str::studly($this->driver);
if (!\class_exists($className)) {
    throw new DriverException('Could not find driver');
}


return new $className();