What can be the potential issues with using break and continue in PHP?

  • Overuse of break and continue can make the code harder to read and understand.
  • Break and continue can lead to infinite loops if used improperly.
  • Break and continue can cause errors in the code execution.
  • Overuse of break and continue can improve code readability.
The correct option is: "Break and continue can lead to infinite loops if used improperly." When using break and continue statements, it's important to ensure they are placed correctly within the loop and that the loop's termination condition is eventually met to avoid infinite loops. Learn more: https://www.php.net/manual/en/control-structures.break.php, https://www.php.net/manual/en/control-structures.continue.php
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *