How can the use of exit; within a loop affect the execution flow in PHP scripts?

Using `exit;` within a loop in a PHP script will immediately terminate the script, causing the loop and any subsequent code to stop execution. This can be useful to stop the script under certain conditions, but it should be used carefully to avoid unexpected behavior.

for ($i = 0; $i < 10; $i++) {
    if ($i == 5) {
        exit;
    }
    echo $i . "<br>";
}
echo "This line will not be executed.";