PHP buffers the output.
If you want to output stuff to the browser immediately you can use the flush()
and ob_flush()
functions:
for ($i = 0; $i <= 680; $i += 40) {
$url = 'http://www.yelp.com/biz/franchino-san-francisco?start=80';
$root = yelp($url);
var_dump($root);
flush();
ob_flush();
}