PHP ob_implicit_flush() Function
❮ PHP Output Control Functions
Example
Send content immediately to the browser on every statement which produces output:
<?php
// Turn on implicit flushing
ob_implicit_flush(1);
// Some
browsers will not display the content if it is too short
// We use
str_pad() to make the output long enough
echo str_pad("Hello World!",
4096);
// Even though the script is still running, the browser already
can
see the content
sleep(3);
?>
Definition and Usage
The ob_implicit_flush()
function enables or disabled implicit flushing. When enabled, implicit flushing sends output directly
to the browser as soon as it is produced so that calls to the flush()
function are not
needed.
Syntax
ob_implicit_flush(flag);
Parameter Values
Parameter | Description |
---|---|
flag | When set to 1, implicit flushing is turned on. When set to 0, implicit flushing is turned off. |
Technical Details
PHP Version: | 4+ |
---|
❮ PHP Output Control Functions
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.