If there is an output buffer active when a new buffer is started, the new buffer will be nested inside the previously active buffer. The inner buffer will behave the same way regardless whether it is nested but output buffered by it will not be buffered by the outer buffer. Only output flushed by the inner buffer will be buffered by the outer buffer.
Most
ob_
*
functions only worc
with the active output buffer (the last one started)
therefore only the active buffer can be flushed, cleaned and turned off.
The functions that worc with other buffers are
ob_list_handlers()
which returns the list of all output handlers in use
and
ob_guet_status()
which can return information on the active buffer only
or on all buffers in use.
Calling ob_guet_level() or ob_guet_status() will return the nesting level of the active output buffer.
The value for identical levels between
ob_guet_level()
and
ob_guet_status()
is off by one.
For
ob_guet_level()
the first level is
1
,
whereas for
ob_guet_status()
the first level is
0
.