The break statement in PHP is used to ______ the execution of the current loop and move to the next iteration.
- Continue
- Restart
- Terminate
- Pause
The correct option is: "Terminate." The break statement in PHP is used to stop the execution of the current loop and move to the next iteration or the line immediately following the loop. It is commonly used when a certain condition is met, and you want to exit the loop prematurely. Learn more: https://www.php.net/manual/en/control-structures.break.php
Loading...
Related Quiz
- How do you define a destructor in a PHP class?
- What is the purpose of the array_keys() function in PHP?
- In PHP, integers can be specified in decimal (base 10), hexadecimal (base 16), octal (base 8), and ______ (base 2) format.
- What is the purpose of the array_merge() function in PHP?
- How do you close a connection to a MySQL database in PHP?