首页 >社区问答列表 >如果在这个地方用三目运算,如果为真,返回错误

如果在这个地方用三目运算,如果为真,返回错误

      $conf ='app_debug';
      $isExist= Config::has($conf);
      $isExist= $isExist ? (Config::get($conf)) : ($conf."配置项不存在");
      return ($isExist);----$conf为真报错

     dump($isExist);------正确