这段代码报错怎么处理

81次阅读

共计 285 个字符,预计需要花费 1 分钟才能阅读完成。

  1. public function setCodeLength(int $length): GA|PHPGangsta_GoogleAuthenticator
  2.     {
  3.         $this->_codeLength = $length;
  4. return $this;
  5.     }

复制代码

报错内容:

  1. PHP Parse error:  syntax error, unexpected ‘|’, expecting ‘;’ or ‘{‘ in /home/wwwroot/www.kskxs.com/src/Utils/GA.php on line 116

复制代码

网友回复:

注册 php7.4.0 以上才支持的用法,需要升级 php 版本

正文完
 0