New parameters, additional parameter to callback function

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@166175 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Jakub Vrana 2004-08-12 18:56:23 +00:00
parent 70f84f9c25
commit 00cbfe551a

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.10 $ -->
<!-- $Revision: 1.11 $ -->
<!-- splitted from ./en/functions/outcontrol.xml, last change in rev 1.1 -->
<refentry id="function.ob-start">
<refnamediv>
@ -10,9 +10,9 @@
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>ob_start</methodname>
<methodparam choice="opt"><type>callback</type><parameter>
output_callback
</parameter></methodparam>
<methodparam choice="opt"><type>callback</type><parameter>output_callback</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>chunk_size</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>erase</parameter></methodparam>
</methodsynopsis>
<para>
This function will turn output buffering on. While output
@ -38,6 +38,11 @@
expected to return a new output buffer as a result, which will be
sent to the browser. If the <parameter>output_callback</parameter> is not
a callable function, this function will return &false;.
If the callback function has two parameters, the second parameter is filled
with the bit-field consisting of
<constant>PHP_OUTPUT_HANDLER_START</constant>,
<constant>PHP_OUTPUT_HANDLER_CONT</constant> and
<constant>PHP_OUTPUT_HANDLER_END</constant>.
</para>
<note>
<para>
@ -54,6 +59,16 @@
<parameter>output_callback</parameter> can not be executed.
</para>
</note>
<para>
If an optional parameter <parameter>chunk_size</parameter> is passed, the
callback function is called on every first newline after
<parameter>chunk_size</parameter> bytes of output.
</para>
<para>
If an optional parameter <parameter>erase</parameter> is set to &false;
buffer may not be deleted until script finishes. It is available since
PHP 4.3.0.
</para>
<para>
Output buffers are stackable, that is, you may call
<function>ob_start</function> while another