这让我很困惑。为什么第一行有效,而当我动态创建对象时却无效?
$a = new Strategy\NotificationStrategy(); // This works
$className = "Strategy\\NotificationStrategy";
var_dump(class_exists($className)); // bool(false)
$strategy = new $className(); // Fatal error: Class 'Strategy\NotificationStrategy' not found, etc..