<p>Google chrome doesn't behave the same as other browsers when encountering this nugget:</p>

<pre><code>&lt;?php
while (true) {
    echo "&lt;script type='text/javascript'&gt;\n";
    echo "alert('hello');\n";
    echo "&lt;/script&gt;";
    flush();

    sleep(5);
}
?&gt;
</code></pre>

<p>It seems that it's waiting for the connection to terminate before doing anything.</p>

<p>Other than polling how can I do a similar thing in Google Chrome?</p>

I wish I had access to Chrome at the moment to test out some ideas. Have you tried adding some HTML after
```
</script>
```
and seeing if it renders incrementally?  I imagine it would, and if so that'd be proof that Chrome doesn't want to run javascript in
```
<script>
```
elements while the page is loading.  Of course, rendering the markup might trigger your scripts to run.  If not, you could try including the javascript as external files and see if that affects execution time.
I think browsers generally have some leeway according to the spec in when they begin executing javascript, especially as the page loads.  It might not be possible to do this in a fully cross-browser way without polling.