Save me from raptor death – is there any better way to handle this kind of structure?
while(condition) {
$this->phase1();
$this->phase2();
$this->phase3();
$this->phase4();
}
Throughout either one of those methods, the condition could be met. IMMEDIATELY after the condition is met, the loop MUST exit. If I could call break; inside of phase2(); for example, I wouldn’t need a goto statement (but of course, that would throw an error).
Return a boolean to execute each stage until successful.