title: how to break loop from nested function?
body: <p>Heres the problem</p>
  
  <pre><code>public function loop (){
      while($this-&gt;controlFunction()){
          //do stuff
      }
  }
  public function controlFunction (){
       $this-&gt;nestedFunction();
  }
  
  public function nestedFunction (){
     if($condA){ //whatsoever the condition
         break;
     } 
  }
  </code></pre>
  
  <p>Is that possible ? I dont wanna return and then use a flag to return back again, seems like spaghetti code</p>
  
  <p>Thanks for the answer guys, after thought, my question seems quite stupid though... Anyways thank you :)</p>