Jump to content

[SOLVED] Does PHP clean up properly at the end of file if an ob_start is unflushed?


da__smith

Recommended Posts

Hi PHP Freaks

 

 

Does PHP clean up properly (i.e. ob_flush();flush();)  if an ob_start is unflushed/uncleaned before the end of the PHP file?

PHP version 5 is in use.

 

To illustrate the question I know that the following, very much simplified, example outputs PHP/HTML to the browser:

 

---PHP file, called by the browser, start---

 

ob_start();

...PHP/HTML

 

---PHP file, called by the browser, end---

 

The buffer is outputted to the browser, which means that PHP flushes at the end of the PHP file. Does PHP flush/clean *everything* at the end of the file? Will there be any server/PHP issues with this?

 

 

all the best

Dave

 

PHP cleans up EVERYTHING at the end of any http request so whether it's flushed or not shouldn't affect anything being held in memory after the request has been completed.

 

If only we actually had persistence in PHP (without sessions)... "oh hark ye olde days of desktop programming!"

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.