title: Will it improve performance if I loop through a large array in chunks?
body: <p>I just came across an answer for javascript and tried out.  It actually works in a way that compare to looping through the whole array, it eliminates the screen-frozen effect:
  <a href="https://stackoverflow.com/a/10344560/2083396">https://stackoverflow.com/a/10344560/2083396</a></p>
  
  <p>So my questions is: <strong>is there any similar way in PHP to improve performance?</strong></p>
  
  <p>My understanding is that in the javascript solution, after each timeout callback is called, its scope is destroyed.  And thus the resource is released. (did I understand it correctly?)</p>
  
  <p>Is there any way we could do so in PHP and does it help?</p>
  
  <p>Thanks!</p>