Apparently Register_ShutDown_Function() makes the user's browser hang on for the ride.
It (IMO) should be the behaviour of PHP that you can do time intensive operations that the user need not wait for (sending mail, writing to log files, cleaning up open connections) in the shutdown....
However.. if you register a function in the shutdown that takes a lot of time, the page won't render for the user till its done. 🙁
function WasteTime(){
sleep(10);
}
Register_ShutDown_Function("WasteTime");
exit();
Count to 10, and then you'll see the page.
Playing with flush() didn't help me solve this problem. Any ideas, please e-mail me.