search

Home  >  Q&A  >  body text

If ternary arithmetic is used here, if true, an error will be returned.

    $conf ='app_debug';
            $isExist= Config::has($conf);
              $isExist=  $isExist ? (Config::get($conf)) : ($conf." The configuration item does not exist");
return ($isExist);----If $conf is true, an error will be reported

dump($isExist);------Correct

笑的承诺-雷笑的承诺-雷2405 days ago1191

reply all(1)I'll reply

  • 李喜欢

    李喜欢2018-07-28 13:01:22

    Cannot return Boolean value

    reply
    0
  • Cancelreply