array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'es', ), 'this' => array ( 0 => 'function.ob-list-handlers.php', 1 => 'ob_list_handlers', ), 'up' => array ( 0 => 'ref.outcontrol.php', 1 => 'Funciones del Control de la salida', ), 'prev' => array ( 0 => 'function.ob-implicit-flush.php', 1 => 'ob_implicit_flush', ), 'next' => array ( 0 => 'function.ob-start.php', 1 => 'ob_start', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'es', 'path' => 'reference/outcontrol/functions/ob-list-handlers.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8)
ob_list_handlers — Enumerar todos los gestores de salida en uso
Esta función devolverá un array con los gestores de salida en uso (si existen). Si output_buffering está habilitado o se usó una función anónima con ob_start(), ob_list_handlers() devolverá "default output handler" (gestor de salida predeterminado).
Ejemplo #1 Ejemplo de ob_list_handlers()
<?php
//usando output_buffering=On
print_r(ob_list_handlers());
ob_end_flush();
ob_start("ob_gzhandler");
print_r(ob_list_handlers());
ob_end_flush();
// funciones anónimas
ob_start(function($string) { return $string; });
print_r(ob_list_handlers());
ob_end_flush();
?>
El resultado del ejemplo sería:
Array ( [0] => default output handler ) Array ( [0] => ob_gzhandler ) Array ( [0] => Closure::__invoke )