Niklas R
Niklas R

Reputation: 16900

ob_start() flushed automatically when PHP script ends

When I call ob_start() but not any of the end methods, the output is still being sent as if I would call ob_end_flush(). Is this always the case or does it depend on a PHP version or configuration parameter?

PHP 5.5.3

Upvotes: 0

Views: 241

Answers (1)

cptPH
cptPH

Reputation: 2401

related Question/Answer:

"...PHP flushes your output buffer implicitly when not using one of the ob_end_* functions."

so if you don't want that you need to use ob_end_clean()

Upvotes: 1

Related Questions