nlopess         Sat Jan  3 08:57:34 2004 EDT

  Modified files:              
    /phpdoc/en/reference/outcontrol/functions   ob-list-handlers.xml 
  Log:
  added example
  
Index: phpdoc/en/reference/outcontrol/functions/ob-list-handlers.xml
diff -u phpdoc/en/reference/outcontrol/functions/ob-list-handlers.xml:1.1 
phpdoc/en/reference/outcontrol/functions/ob-list-handlers.xml:1.2
--- phpdoc/en/reference/outcontrol/functions/ob-list-handlers.xml:1.1   Fri Jan  2 
12:45:45 2004
+++ phpdoc/en/reference/outcontrol/functions/ob-list-handlers.xml       Sat Jan  3 
08:57:34 2004
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
   <refentry id="function.ob-list-handlers">
    <refnamediv>
     <refname>ob_list_handlers</refname>
@@ -14,7 +14,44 @@
      <void/>
     </methodsynopsis>
     <para>
-     This will return an array with the output handlers in use (if any).
+     This will return an array with the output handlers in use (if any). If
+     <link
+      linkend="ini.output-buffering">output_buffering</link> is
+     enabled, <function>ob_list_handlers</function> will return "default
+     output handler". 
+    </para>
+    <para>
+     <example>
+      <title><function>ob_list_handlers</function> example</title>
+      <programlisting role="php">
+<![CDATA[
+<?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();
+?>
+]]>
+      </programlisting>
+      <para>
+       The above example will output:
+      </para>
+      <screen>
+<![CDATA[
+Array
+(
+    [0] => default output handler
+)
+Array
+(
+    [0] => ob_gzhandler
+)
+]]>
+      </screen>
+     </example>
     </para>
     <para>
      See also <function>ob_end_clean</function>,

Reply via email to