Введение

The Output Control functions allow you to control when output is sent from the script. This can be useful in several different situations, especially if you need to send headers to the browser after your script has began outputting data. The Output Control functions do not affect headers sent using header() or setcookie(), only functions such as echo() and data between blocks of PHP code.

Замечание: When upgrading from PHP 4.1.x (and 4.2.x) to 4.3.x due to a bug in earlier versions you must ensure that implict_flush is OFF in your php.ini, otherwise any output with ob_start() will not be hidden from output.

Коментарии

Автор:
[In English:]
it's seem have performance impact, try this with and without bufferisation ( by output_buffering = 4096, or ob_start + ob_end_flush, it looks similar)

[En Francais:]
Ca semble avoir un fort impact sur les performances aussi, essayez ca avec et sans bufferisation ( par output_buffering = 4096, ou bien ob_start + ob_end_flush, ca semble identique)

<?php
for ($j=1$j <= 5$j++)  {

  list(
$usec$sec) = explode(" ",microtime());
 
$debut[$j] = ((float)$usec + (float)$sec);

  echo 
str_repeat("0123456789",5000) . '<br>' ;

  list(
$usec$sec) = explode(" ",microtime());
 
$fin[$j] = ((float)$usec + (float)$sec);
}

for (
$j=1$j <= 5$j++)  {
   echo 
round($fin[$j]-$debut[$j], 5) . '<br>';
}
?>
2009-02-11 22:23:29
http://php5.kiev.ua/manual/ru/intro.outcontrol.html

    Поддержать сайт на родительском проекте КГБ