PHP flush() Function

PHP boolval() Function
PHP ob_clean() Function

In this article, you will learn how to get the currently buffered output of the server. The flush() function in PHP requests the server to send its currently buffered output to the browser. The server configuration may not always allow this to happen.

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


examples of the FLUSH() function

Example 1. In this example, we output a string to the browser before the script has finished running.

// 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);

// Use flush() to send the string to the browser

// Display the rest of the content three seconds later
echo "<br>";
echo "Hello World!";
PHP boolval() Function
PHP ob_clean() Function
en English
Scroll to Top