在 php 7.3 中 switch 语句中使用 continue

while ($foo) { switch ($bar) { case "baz": continue; // In PHP: Behaves like "break;" // In C: Behaves like "continue 2;" } } 最好的方式是把 continue 改为 continue 2 或 break https://wiki.php.net/rfc/continue_on_switch_deprecation ↩︎ https://github.com/aces/Loris/issues/4037 ↩︎ https://github.com/squizlabs/PHP_CodeSniffer/pull/2086 ↩︎
联系我们

邮箱 626512443@qq.com
电话 18611320371(微信)
QQ群 235681453

Copyright © 2015-2022

备案号:京ICP备15003423号-3