• 0

[PHP] ob_start() - What are the Pros and Cons


Question

I recently discovered the ob_start() command that apparently caches/compresses the compiled code sent to the client's browser.

What I would like to ask the PHP experts here is, what are the pros and cons of using this statement.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Cons: Memory usage, slower gzip than the builtin apache version.

Pros: Not having to worry about setcookie() and header() weirdness (as much).

ob_start() can be a good helper, but don't try to rely on it. :)

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.