# ob_start callback not fired with ob_get_clean()

- Thread: https://externals.io/message/60314
- Original archive: https://news-web.php.net/php.internals/60314
- Started by Dmitri Snytkine on 2012-04-25T15:50:27+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #60314 — Dmitri Snytkine — 2012-04-25T15:50:27+00:00

URL: https://externals.io/message/60314#60314

I am wondering why the call to ob_get_clean and ob_get_contents does not
trigger the callback function registered with ob_start('mycallback')

I don't want to dump buffer to the browser but instead need to just store
results in a variable, thus using `ob_get_clean()`
but why it's my callback being executed during this call?
It's actually in the documentation and ob_get_clean is not listed among the
functions that trigger the callback.

Is there a good reason why callback not fired for these functions?


Dmitri Snytkine
Web Developer
Ultra Logistics, Inc.
Phone: (888) 220-4640 x 2097
Fax: (888) 795-6642
E-Mail: dsnytkine@ultralogistics.com
Web: www.ultralogistics.com

"A Top 100 Logistics I.T. Provider in 2011"

---

## #60328 — Michael Wallner — 2012-04-27T06:21:16+00:00

URL: https://externals.io/message/60314#60328 · In reply to: #60314

> I am wondering why the call to ob_get_clean and ob_get_contents does not
> trigger the callback function registered with ob_start('mycallback')

You could at least have told what PHP version you're using...
The output control layer implementation has been replaced in 5.4.

Despite this list being neither a bug tracker nor a support forum:
- Reproduce script?
- Expected result?
- Actual result?
- In which version did it work "correctly" last?

Thank you.

-- 
Regards,
Mike
