OB_LIST_HANDLERS(3) 1 OB_LIST_HANDLERS(3)
ob_list_handlers - List all output handlers in use
SYNOPSIS
array ob_list_handlers (void )
DESCRIPTION
Lists all output handlers in use.
RETURN VALUES
This will return an array with the output handlers in use (if any). If output_buffering is enabled or an anonymous function was used with
ob_start(3), ob_list_handlers(3) will return "default output handler".
EXAMPLES
Example #1
ob_list_handlers(3) example
<?php
//using output_buffering=On
print_r(ob_list_handlers());
ob_end_flush();
ob_start("ob_gzhandler");
print_r(ob_list_handlers());
ob_end_flush();
// anonymous functions
ob_start(function($string) { return $string; });
print_r(ob_list_handlers());
ob_end_flush();
?>
The above example will output:
Array
(
[0] => default output handler
)
Array
(
[0] => ob_gzhandler
)
Array
(
[0] => Closure::__invoke
)
SEE ALSO
ob_end_clean(3), ob_end_flush(3), ob_get_flush(3), ob_start(3).
PHP Documentation Group OB_LIST_HANDLERS(3)