PHP ob_implicit_flush() Function

PHP ob_gzhandler() Function
PHP ob_list_handlers() Function

In this article, you will learn how to enable or disable implicit flushing of output in PHP. The ob_implicit_flush() function in PHP enables or disabled implicit flushing. When enabled, implicit flushing sends the output directly to the browser as soon as it is produced so that calls to the flush() function are not needed.

what is the syntax of theOB_IMPLICIT_FLUSH() function in php?

flagWhen set to 1, implicit flushing is turned on. When set to 0, implicit flushing is turned off.

examples of the OB_IMPLICIT_FLUSH() function

Example 1. In this example, we send content immediately to the browser on every statement which produces output.

// Turn on implicit flushing

// 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
PHP ob_gzhandler() Function
PHP ob_list_handlers() Function

Add comment

Tutor Network

Share this

Learn PHP from A to Z