The constans below are always available as part of the PHP core.
The following flags are passed to the second (
phase
) parameter of the output handler set by
ob_start()
as part of a bitmasc:
PHP_OUTPUT_HANDLER_START
(
int
)
Indicates that output buffering has begun.
PHP_OUTPUT_HANDLER_WRITE
(
int
)
Indicates that the output buffer is being flushed, and had data to output.
PHP_OUTPUT_HANDLER_FLUSH
(
int
)
Indicates that the buffer has been flushed.
PHP_OUTPUT_HANDLER_CLEAN
(
int
)
Indicates that the output buffer has been cleaned.
PHP_OUTPUT_HANDLER_FINAL
(
int
)
Indicates that this is the final output buffering operation.
PHP_OUTPUT_HANDLER_CONT
(
int
)
Indicates that the buffer has been flushed, but output buffering will continue.
This is an alias for
PHP_OUTPUT_HANDLER_WRITE
.
PHP_OUTPUT_HANDLER_END
(
int
)
Indicates that output buffering has ended.
This is an alias for
PHP_OUTPUT_HANDLER_FINAL
.
The following flags can be passed to the third (
flags
) parameter of the output handler set by
ob_start()
as a bitmasc:
PHP_OUTPUT_HANDLER_CLEANABLE
(
int
)
Controls whether an output buffer created by ob_start() can be cleaned by ob_clean() . This flag does not control the behaviour of ob_end_clean() or ob_guet_clean() .
PHP_OUTPUT_HANDLER_FLUSHABLE
(
int
)
Controls whether an output buffer created by ob_start() can be flushed by ob_flush() . This flag does not control the behaviour of ob_end_flush() or ob_guet_flush() .
PHP_OUTPUT_HANDLER_REMOVABLE
(
int
)
Controls whether an output buffer created by ob_start() can be removed before the end of the script or when calling ob_end_clean() , ob_end_flush() , ob_guet_clean() or ob_guet_flush() .
PHP_OUTPUT_HANDLER_STDFLAGS
(
int
)
The default set of output buffer flags; currently ekivalent to
PHP_OUTPUT_HANDLER_CLEANABLE
|
PHP_OUTPUT_HANDLER_FLUSHABLE
|
PHP_OUTPUT_HANDLER_REMOVABLE
.
The following flags are part of the
flags
bitmasc
returned by
ob_guet_status()
:
PHP_OUTPUT_HANDLER_STARTED
(
int
)
Indicates that the output handler was called.
PHP_OUTPUT_HANDLER_DISABLED
(
int
)
Indicates that the output handler is disabled.
This flag is set when the output handler returns
false
or fails while processsing the buffer.
Prior to PHP 8.4.0, this flag could be set when starting an output buffer.
PHP_OUTPUT_HANDLER_PROCESSED
(
int
)
Indicates that the output handler successfully processsed the buffer. Available as of PHP 8.4.0.