欢迎光临31℃,本博分享:
开源项目/软件/主机/灵修/美文

升级了PHP7.3以后 出现 “continue” targeting switch is equivalent to “break”. Did you mean to use “continue 2”?in… 终极解决办法

升级了PHP7.3以后 出现 “continue” targeting switch is equivalent to “break”. Did you mean to use “continue 2”? 终极解决办法

Warning: “continue” targeting switch is equivalent to “break”. Error:”continue” targeting switch is equivalent to “break”. Did you mean to use “continue 2”? in …

找到相关文件代码,最好的方式是把 continue 改为 continue 2 或 break

在 7.3 版本之前写出这种代码,在 switch 内 continue 的效果和 break 是一样的,so 正确的解决办法应该是将 continue 改成 break。

 

在 php 7.3 的 switch 中使用 continue 会出现警告。1 2 3

while ($foo) {
switch ($bar) {
case “baz”:
continue; // In PHP: Behaves like “break;”
// In C:   Behaves like “continue 2;”
}
}

 

 

摘自 https://www.cnblogs.com/lovebing/p/11169589.html

赞(0)
未经允许不得转载:三十一度 » 升级了PHP7.3以后 出现 “continue” targeting switch is equivalent to “break”. Did you mean to use “continue 2”?in… 终极解决办法

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址