I want to run two loops one after the other but it seems the return
statement in the first loop ends the script:
// this runs
for ($i = 0; $i < 3; $i++) {
try {
foo();
return true;
} catch (Exception $e) {
try {
bar();
} catch (Exception $e) {
return false;
}
}
}
// this doesn't
for ($i = 0; $i < 3; $i++) {
try {
foo();
return true;
} catch (Exception $e) {
try {
bar();
} catch (Exception $e) {
return false;
}
}
}